Skip to content

fix(ci): isolate invalid GNOME extension heads - #1001

Merged
hivecommons-hive[bot] merged 2 commits into
projectbluefin:mainfrom
hanthor:fix/gnome-extension-updater-skip-invalid-source
Oct 29, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
projectbluefin:mainfrom
hanthor:fix/gnome-extension-updater-skip-invalid-source

Conversation

@hanthor

@hanthor hanthor commented Oct 28, 2026

Copy link
Copy Markdown
Member

Why

The upstream BudsLink branch removed its extension source and metadata. The updater currently aborts the whole batch when one changed head has invalid metadata, blocking unrelated valid extension updates.

Change

  • Keep a submodule at its existing known-good gitlink when the candidate head has missing or invalid shell metadata.
  • Report the rejected upstream SHA and reason in the PR table and Actions summary, then continue processing other submodules.
  • Preserve fail-closed behavior for fetch/ref errors and for invalid metadata at the currently pinned commit.
  • Add an isolated regression test with one valid and one source-less upstream.

Verification

  • python3 tests/test_gnome_extension_bumps.py — passed.
  • umask 022 && just check — passed (1,234 tests).
  • pre-commit run --all-files — passed.

No automatic merge is added; the workflow still dispatches contract-only CI.

Keep the known-good submodule pin when an upstream head drops required metadata, report the skipped candidate, and continue proposing valid independent updates.

Assisted-by: GPT-6 Luna via GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danathar, hanthor

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive

Copy link
Copy Markdown
Contributor
1e805a9

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @hanthor, head 1e805a964d01) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/update-gnome-extensions.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@hanthor is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff` role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: This change stops the weekly GNOME extension updater from giving up entirely when one upstream project deletes its extension; that one is now held at its last good version and reported, while the others still get proposed. I read the new script, the workflow, the helper it calls, and the test, and found no correctness or security problems. A few small clarity and convention points below, each with a ready-to-apply fix.


style

  • .github/scripts/prepare-gnome-extension-bumps.py:1 — this creates a new .github/scripts/ directory holding a single file. Every other Python tool in the repo (including the helper this script shells out to, scripts/gnome-extension-shell-versions.py:1, and scripts/check-script-syntax.py) lives under scripts/. Suggest moving it to scripts/prepare-gnome-extension-bumps.py and dropping parents[2] → parents[1] at line 13, plus the two path references in .github/workflows/update-gnome-extensions.yml:31 and tests/test_gnome_extension_bumps.py:11. (low)
  • .github/scripts/prepare-gnome-extension-bumps.py:119 — on a skipped row the "GNOME shell-version" column shows the pinned commit's value (51) directly beside the rejected upstream SHA, which reads as if the rejected head declares 51. Label it so the PR table is unambiguous for the maintainer deciding whether to merge:
    -            Bump(path, pinned, upstream, pinned_versions, "skipped (invalid upstream metadata)")
    +            Bump(path, pinned, upstream, f"{pinned_versions} (pinned)", "skipped (invalid upstream metadata)")
    and in tests/test_gnome_extension_bumps.py:126 change | 51 | skipped → | 51 (pinned) | skipped. (low)
  • .github/workflows/update-gnome-extensions.yml:33-34 — the comment "Always run create-pull-request, including on an empty diff…" used to justify the : > "$RUNNER_TEMP/…" line that was deleted; it now dangles after the python call with nothing it explains. Move it above the Propose GNOME extension update step or drop it. (low)

docs-currency

  • docs/skills/ci-workflows.md:90-98 — the rewrite removes "Each .gitmodules branch must name a real remote branch; git submodule update --remote cannot follow a tag written as a branch." That constraint is unchanged: the new script still fetches +refs/heads/{branch} (prepare-gnome-extension-bumps.py:86-90) and falls back to submodule update --remote (line 93). Suggest keeping that sentence. (low)

correctness

  • tests/test_gnome_extension_bumps.py:48 — because --root points at a temp dir outside EXTENSIONS_BASE, the helper's relative_to at scripts/gnome-extension-shell-versions.py:31 fails and every lookup takes the FALLBACK_LOCATIONS path, so the SOURCE_EXTENSIONS branch used in production is never exercised, and neither is the fail-closed branch at prepare-gnome-extension-bumps.py:112-115 (pinned metadata also invalid → exit 1). Not a blocker — the production path is unchanged from the old shell step — but a second test that breaks metadata.json in both pinned and upstream commits and asserts returncode == 1 would cover the fail-closed claim in the PR body. (info)

No findings from: security, intent-alignment.

Confidence: 5/5 (safe)

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge: the PR edits CI workflow / action files: awaiting owner approval — a hive owner / trusted merger's GitHub Approve review on the current head (or a dashboard /hive decision approve) releases the fence and the hive merges it; approval on an earlier head does not count, so re-approve after a push.

Head: verdict approved @1e805a9, 19/19 checks green, soak 30m0s elapsed.

What to do: a trusted merger approves this head (1e805a9) with a GitHub Approve review (or a dashboard /hive decision approve), which releases the CI workflow-file fence, and the hive merges the PR once the other gates clear; approval on an earlier head does not count, and a /hive approve reply does not release the fence.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. An approval does not bypass CI, hold labels or other merge gates.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 1e805a9. Invalid upstream metadata retains the known-good gitlink while valid extension bumps continue; fetch/ref failures and invalid pinned metadata still fail closed. Dispatch remains contract-only; current CI is green. I am not submitting self-approval or treating the workflow fence and no-dco marker as implicitly waived. Preserve the current ownership/sign-off and explicit workflow-authorization requirements; any new head needs fresh CI/review.

@Danathar Danathar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: isolating the invalid GNOME extension heads looks right; checks green.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar approved head 1e805a964d01, which edits CI workflow / action files. That explicit owner approval releases the contributor lane's workflow-path fence: the hive merges this PR itself once the usual gates (CI, soak, holds, review verdict) are clear. A new push re-arms the fence until the new head is approved again.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge: GitHub refused to bring the branch up to date: the base changed .github/workflows/ files and the Hive App lacks the Workflows permission, so no hive agent can push that update. A person must merge or rebase the base into the branch and push, or grant the App Workflows: write.

Head: verdict approved @1e805a9, approved by @Danathar, 19/19 checks green, soak 30m0s elapsed.

What to do: a trusted merger approves this head (1e805a9) with a GitHub Approve review (or a dashboard /hive decision approve), which releases the CI workflow-file fence, and the hive merges the PR once the other gates clear; approval on an earlier head does not count, and a /hive approve reply does not release the fence.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. An approval does not bypass CI, hold labels or other merge gates.

@hivecommons-hive

Copy link
Copy Markdown
Contributor
304acd9

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @hanthor, head 304acd97cd4a) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/update-gnome-extensions.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar approved head 304acd97cd4a, which edits CI workflow / action files. That explicit owner approval releases the contributor lane's workflow-path fence: the hive merges this PR itself once the usual gates (CI, soak, holds, review verdict) are clear. A new push re-arms the fence until the new head is approved again.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 29, 2026
hivecommons-hive Bot pushed a commit to hivecommons/hive that referenced this pull request Oct 29, 2026
… stop retrying it (#15382)

GitHub refuses update-branch when the base changed .github/workflows/ and
the head lives in a fork the App is not installed on. The classifier
checked for the workflow refusal before looking at the fork flag, so the
PR parked at 085 as workflow-permission, asking the owner to grant
Workflows: write the App already held (projectbluefin/utah#1001), and the
sweep sent the same refused update-branch every tick.

- A workflow-file refusal (403, or 422 with the same text) on a fork head
  is fork-workflow-update: 085, with a cause naming who can update the
  branch and no permission ask. Same-repo heads keep workflow-permission,
  now worded "if the installation lacks it".
- updateBranchAndSkip remembers a workflow-file refusal per head and base
  and does not call update-branch again until one of them moves.
- The hold guard shares the classifier and gains the fork stop reason and
  note.


Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read .github/scripts/prepare-gnome-extension-bumps.py against the bash step it replaces and against the test. Looks correct to me:

  • Fail-closed paths are preserved: run_git raises on any fetch/checkout/rev-parse failure and main() turns that into exit 1 (prepare-gnome-extension-bumps.py:26-32, 160-166), so a broken ref still stops the step before create-pull-request runs, same as the old set -e loop.
  • The skip path re-checks out the pinned gitlink and re-validates its metadata (:109-115); an invalid pin still raises, so the only thing that changed is that an invalid candidate head no longer takes the batch down.
  • A skipped submodule ends at the HEAD gitlink, so add-paths produces no diff for it and the summary still shows the rejected upstream SHA.
  • tests/test_gnome_extension_bumps.py drives one valid and one source-less upstream through the real script and asserts both the working trees and the report rows.

Minor note, not a defect: this and #998 both edit docs/skills/desktop-contract.md in nearby (non-overlapping) hunks; whichever lands second will need a trivial rebase.

Confidence: 5/5 (safe)

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 7d1ab89 into projectbluefin:main Oct 29, 2026
31 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#1001304acd9` sha256:0df5cf6fe7f045f8bb48a143218d0d95db4c594a710c7d7ee84af1c3f0399b81 — download from the dashboard or `hivectl review evidence #1001`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Merged by hive contributor-lane auto-merge: CI green for ≥30m, reviewer verdict approve, @hanthor was auto-promoted after 5 clean merged PRs in this hive's repositories.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants