GeezerVison is showing github.com — bws.yaml mirror freshness check: periodic bws-to-sops dry-run diff · Issue #5451 · developing-today/code
bws.yaml mirror freshness check: periodic bws-to-sops dry-run diff #5451DescriptionFollow-up from #5381 (the bws.yaml mirror regeneration, landed in PR #5450).
secrets/sops/common/bws.yaml is a full mirror of the Bitwarden vault produced by lib/bws-to-sops.sh. It drifted silently once already: by the time #5381 was filed, the mirror was missing 27 current vault keys (including the whole supabase.muse-dev2.* set), still carried 10 retired un-namespaced supabase.* keys, and had missed 2 value rotations.
Ask: a periodic freshness check so this cannot happen silently again — e.g. a scheduled job (cron or a dispatch-only workflow, respecting the fleet's CI-on-main rules) that runs lib/bws-to-sops.sh --dry-run, compares the vault key set against the committed mirror's keys, and on any drift (added / removed / value-changed key names — names only, never values) opens or updates a tracking issue as the app.
Acceptance criteria
- A scheduled freshness check exists and runs
lib/bws-to-sops.sh --dry-run (or equivalent key-set comparison) against the committed secrets/sops/common/bws.yaml.
- On drift it surfaces the differing key names (never values) in a GitHub issue, filed or updated as the app, with no duplicate issue per drift episode.
- The check is demonstrated once against a deliberately stale mirror (or the current one pre-regeneration state) and once against a fresh mirror, with output linked here.
Activitydezren39 commented on Nov 4, 2026 Intake review
- Related issues/PRs: merged PRs with this issue number in the title: none found in a merged-PR title search. No merged PR explicitly resolves this issue, so it stays open.
- Notes: Enriched by the fleet monitor (Duty 2, protocol §5): acceptance criteria already present, labels normalized (kind/enhancement, priority/normal, effort/s).
- Risks / suggested approach: Reuse the existing bws/sops tooling in dry-run mode and report names-only drift. Risk: secret values leaking into the report — the check must compare and report key names/hashes only.
dezren39 commented on Nov 5, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 14, 2026
Agent note — task 16990 triage confirmed (lane any-a): task 12224's triage stands; remainder is Drew's runner decision
This task is the coverage-join duplicate of the triage lane code-a completed today as task 12224 (agent note, 2026-11-14T16:22Z). Confirming it against current main (c5f0fef, 2026-11-14T18:52Z) rather than duplicating it:
.github/workflows/bws-freshness.yml is present on current main (nightly + dispatch; fixture tests of the --check contract; live-check job maintaining one names-only drift issue per episode via lib/bws-freshness-drift-issue.sh). Acceptance items 1 and 2 remain satisfied in code.
lib/bws-to-sops.sh on main carries both --dry-run and the names-only --check freshness mode (exit 1 on drift).
- The remainder is unchanged and is genuinely Drew's: the live-check job stays disabled until the runner decision (a secure runner holding BWS read access + SOPS identity; then runs-on + BWS_FRESHNESS_ENABLED=true).
user/escalated correctly stays; the live half of the acceptance-3 demonstration can only run after that decision.
No actionable agent remainder exists, so no small_fix packet is filed; if the runner decision lands, task 12224's note is the enablement spec. Task 16990 completes as triaged on this confirmation. dezren39 commented on Nov 17, 2026 🤖 Agent note · triaged — duplicate of the standing triage (tasks 12224 / 16990); remainder is Drew's runner decision
- Agent: repo-worker-code (Muse lane any-b)
- Session / ID: queue task 18309
- Verdict: this is a coverage duplicate of the triage completed as task 12224 (2026-11-14) and confirmed as task 16990. Re-verified fresh this shift on current main rather than redoing it:
- .github/workflows/bws-freshness.yml is present (nightly schedule + workflow_dispatch; fixture tests of the --check contract; live-check job maintaining exactly one names-only drift issue per episode via lib/bws-freshness-drift-issue.sh, which is also on main). Acceptance items 1 and 2 remain satisfied in code; lib/bws-to-sops.sh carries the names-only --check mode (exit 1 on drift).
- The workflow header (lines 21-24) still records the deliberate disable: the live-check job waits on Drew's runner decision on this issue — provision a secure runner with BWS read access + SOPS decryption for the mirror, point runs-on at it, set BWS_FRESHNESS_ENABLED=true.
- Remainder: only the live half of the acceptance-3 demonstration (stale vs fresh mirror against the real vault), which can only run after that decision. user/escalated stays — it marks exactly this decision. No follow-on enqueued: task 12224's note is the enablement spec for the moment the decision lands.
dezren39 commented on Nov 22, 2026
Decided: The live bws freshness check runs on an existing fleet host that already holds Bitwarden access (the laptop/seat self-hosted surface): point the live-check job there and set BWS_FRESHNESS_ENABLED=true. No new GitHub runner is provisioned and no new copy of the vault credential is created for CI.
Why: The workflow, the names-only --check mode, and the drift-issue machinery are already on main (verified 2026-11-17, tasks 12224/16990/18309); the only open item was "Drew's runner decision". The fleet already reads the vault by name from its own hosts as a routine operation, so the check belongs on one of those hosts; a new credentialed CI runner would add attack surface to protect a names-only diff.
Undo: Move the job's runs-on and the enable flag to a different host in one workflow edit.
By: felix (Muse seat, #12234 owner-parks batch, 2026-11-22) dezren39 commented on Nov 24, 2026 Second-pass verdict, task 21819 (verified fresh 2026-11-24, main 9c2b4ad): the check code is merged and unchanged (workflow + --check contract + drift-issue machinery; acceptance items 1-2 satisfied in code), and the felix runner decision of 2026-11-22 stands. The decision is unimplemented: live-check still runs-on ubuntu-latest gated on vars.BWS_FRESHNESS_ENABLED, the repo has no such variable, and there is no self-hosted runs-on precedent in .github/workflows. Routed enablement follow-on task 22896 (repo-health-code-pilot): fleet-host runs-on + set the flag + one live dispatch run, with explicit park conditions (no admin for the variable, no reachable fleet runner surface, never copy vault credentials to new CI runners). No code changed in this pass. dezren39 commented on Nov 24, 2026
Picked up by Felix lane (worker felix) from the fallback shortlist. Done-check in progress: verifying the merged --check implementation (PRs #6401/#6689/#6694) against current main and the unimplemented 2026-11-22 runner decision (live check on a fleet host + BWS_FRESHNESS_ENABLED=true). Will record evidence here. dezren39 commented on Nov 24, 2026
Felix lane done-check + enablement verdict (2026-11-24)
Done-check: the check this issue asks for already exists on main and works. No new check was built; building a second one would have been a duplicate.
Fixture verification, re-run remotely on branch felix/5451-bws-mirror-freshness @ 705f798 — fleet-command run 45394067046, conclusion success, executed cases read from the log (not just the exit code):
lib/bws-to-sops-check.test.sh: 9/9 PASS — fresh, added, removed, changed, combined, operational, missing, check_beats_dry_run, dry_run_then_check_fresh.
lib/bws-freshness-drift-issue.test.sh: 5/5 PASS — unrelated_first, same_title_no_marker, none_open, only_unrelated, two_owned.
These suites are the standing hermetic stale-vs-fresh demonstration of the contract (stubbed bws/sops; includes the no-secret-values and no-mutation oracles).
Enablement (the 2026-11-22 decision) — verified blocked on the identity-holding host, matching the park conditions routed with task 22896:
gh api orgs/developing-today/actions/runners → total_count 0; repo runners → none; no runner install on this seat. There is no self-hosted surface to point runs-on at, and the decision forbids provisioning a new runner.
- Repo variables: no
BWS_FRESHNESS_ENABLED (deliberately left unset — setting it while runs-on is ubuntu-latest would make the check exit 2 nightly, since a GitHub-hosted runner has no BWS token and cannot decrypt the mirror).
- The Muse seat holds a SOPS age identity (also in the vault by name as
sops.age-private-key-sandbox), but its public key (age1nw32awc9…) does not match the committed mirror's recipient (age125acas5y8…) — public keys compared only, no secret values printed or stored anywhere in this pass. Running lib/bws-to-sops.sh --check from the seat authenticates to the vault fine, then exits 2 at the mirror-decrypt step for exactly that reason. So acceptance 3's live stale/fresh demonstration cannot be produced from the seat either; it belongs on the laptop host that holds the mirror identity (currently unreachable).
Landed for Felix's review: PR #14341 (documentation only, no behavior change) — the workflow header and the doc/fleet-schedule-registry.md row no longer describe the pre-decision state; they record the 2026-11-22 decision, the verified blocker above, the exact enablement steps, and the never-set-the-flag-on-ubuntu-latest warning, so the next pass does not have to re-derive this from comments again.
Remaining, in order: (1) laptop host reachable + registered as a self-hosted runner (or the check scheduled on that host directly), (2) point runs-on at it and set BWS_FRESHNESS_ENABLED=true in the same change, (3) one live dispatch run + the stale/fresh live demonstrations linked here, (4) close this issue. No new dependencies. developing-today-fleet commented on Nov 24, 2026
Agent note — task 22896 parked again: ready condition still unmet (ITEM-WORK-189, 2026-11-24)
- Agent: Archer item lane ITEM-WORK-189 (worker archer)
- Task: 22896 — enable the bws-freshness live-check per the 2026-11-22 runner decision.
- State: checkpointed at stage blocked-runner-unregistered and parked with the wake protocol below. No code was changed by this lane; the check machinery is already merged and fixture-verified (see the felix done-check above, 2026-11-24T12:46Z).
Why parked: the enablement is externally blocked on a machine-checkable condition that is still false:
- No self-hosted runner is registered on developing-today/code. Verified three times on 2026-11-24: the felix done-check at 12:46Z (org and repo runners total_count 0), the previous park re-check at 16:15Z (total_count 0, BWS_FRESHNESS_ENABLED unset), and this lane at ~17:21Z (the sandbox gh user token is rate-limited and the laptop App identity gets 403 Resource not accessible by integration on the runners/variables endpoints, so no newer positive evidence exists; nothing has been tasked to register a runner in between).
- The 2026-11-22 decision forbids provisioning a new runner and forbids a new copy of the vault credential for CI, so this lane does not register one.
- BWS_FRESHNESS_ENABLED stays unset on purpose: setting it while the live-check still runs-on ubuntu-latest would make the check exit 2 nightly (a GitHub-hosted runner has no BWS token and cannot decrypt the mirror).
Wake condition (also in the park reason and the task progress.next): when gh api repos/developing-today/code/actions/runners returns total_count > 0 — a fleet host that already holds Bitwarden access (the laptop, per the decision) registered as a self-hosted runner on this repo — the waking lane, in ONE change: (1) points the live-check job in .github/workflows/bws-freshness.yml at that runner label, (2) sets repository variable BWS_FRESHNESS_ENABLED=true, (3) dispatches one live workflow_dispatch run and verifies rc 0 (fresh) or a single names-only drift issue, and (4) links the run evidence here and closes this issue. developing-today-fleet commented on Nov 26, 2026 oc-code-08 recheck (task 22896, 2026-11-26): repository runners endpoint returns total_count=0; Actions variables list contains AUTO_FORMAT_LAST_SUCCESS_SHA and BRANCH_CLEANUP_LIVE, not BWS_FRESHNESS_ENABLED. Workflow is active. Per the recorded decision, no flag is set and no workflow edit or dispatch is safe until an existing fleet-host runner holding the required Bitwarden access is registered. Resume when runner total_count > 0; then configure runs-on and the flag together, dispatch once, and record the live result. developing-today-fleet commented on Nov 26, 2026
Re-park (code-h, task 22896, 2026-11-26): blocker unchanged. Repo Actions runners total_count=0, no BWS_FRESHNESS_ENABLED variable, workflow still gated. Per the 2026-11-22 runner decision, no new runner and no flag change until an existing fleet-host runner holding Bitwarden access registers. Resume condition stands: wake when runners total_count > 0, then update runs-on + set flag together, dispatch once, verify.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|