Skip to content

bws.yaml mirror freshness check: periodic bws-to-sops dry-run diff #5451

Open

Description

@developing-today

Follow-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.

Activity

  1. added
    priority/normal
    effort/s
    status/needs-triage
    meta/enriched
    on Nov 4, 2026
  2. dezren39 commented on Nov 4, 2026

    @dezren39
    Member

    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.
  3. added
    queue/queued
    task/triage
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    Member

    🤖 Agent note · handed off

  5. added
    queue/parked
    status/parked
    work/assigned
    and removed
    queue/queued
    status/needs-triage
    on Nov 5, 2026
  6. 136 remaining items

  7. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    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.

  8. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    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.

  9. dezren39 commented on Nov 28, 2026

    @dezren39
    Member

    Live-check enablement re-verify — lane 1252-C, 2026-11-28 ~19:03Z. Blocker unchanged; re-parking task 22896.

    Firsthand reads this lane:

    • GET repos/developing-today/code/actions/runners → total_count=0; org runners also total_count=0. No credentialed fleet-host runner exists to point the live-check at.
    • BWS_FRESHNESS_ENABLED repo variable → 404 (absent), correctly not set while no runner exists.
    • bws.yaml mirror freshness check: periodic bws-to-sops dry-run diff #5451 OPEN, unchanged since 2026-11-26T22:56:56Z.

    Wake (non-person): a credentialed fleet-host Actions runner registers (runners total_count > 0) → point live-check runs-on at it, set BWS_FRESHNESS_ENABLED=true, dispatch one workflow_dispatch run, link evidence here.

  10. dezren39 commented on Nov 29, 2026

    @dezren39
    Member

    🤖 Agent note · census 2026-11-29 (lane CEN-C03)

    Census verified: acceptance is complete and testable (scheduled dry-run key-set diff; drift surfaced as an app-filed issue with key names only, never values; demonstrated once against a stale mirror and once against a fresh one). Blocker: none found. Priority: normal (unchanged).

  11. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    🤖 Claim — Felix lane 0640-AB (worker felix), 2026-11-29.

    Taking #5451: the bws.yaml mirror freshness check. Plan: a script that runs the bws-to-sops key-set comparison in dry-run form (names only, never values), a dispatch-only workflow on a schedule (respecting CI-on-main rules), and issue filing/updating on drift with no duplicate per episode — plus a demonstration against a deliberately stale mirror fixture in tests. PR will say Closes #5451 if the full acceptance lands; otherwise a progress note with what remains.

  12. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note — Felix lane 0640-AB, 2026-11-29: claim released after premise check (implementation already landed).

    Verified on main firsthand: lib/bws-to-sops.sh carries the names-only --check mode (exit 0 fresh / 1 drift / 2 operational, values never printed), lib/bws-to-sops-check.test.sh + lib/bws-freshness-drift-issue.test.sh cover the contract with stubbed binaries, and .github/workflows/bws-freshness.yml runs the fixture tests nightly and contains the full drift-issue open/update/close logic. The only remainder is enablement of the live-check job, which parks on the identity-holding host being registered as a self-hosted runner (runner decision recorded on this issue 2026-11-22; BWS_FRESHNESS_ENABLED must never be set while runs-on is ubuntu-latest). That is a host step, not a lane PR slice. No claim held; pulling the next item.

  13. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix):

    • STRENGTHS: Acceptance is complete and testable: scheduled dry-run key-set diff against the committed mirror, drift surfaced as an app-filed issue with key NAMES only (never values), demonstrated once against a stale mirror and once against a fresh one.
    • GAPS: The blocker is operational, and I am recording it plainly because an earlier note today said "blocker: none found": the freshness workflow is gated (no BWS_FRESHNESS_ENABLED variable) and the repo has NO registered Actions runners (total_count=0, re-verified 2026-11-26 and 2026-11-28) — per the 2026-11-22 runner decision, no new runner and no flag change until an existing fleet-host runner holding Bitwarden access registers.
    • FIXES I APPLIED: None needed — priority/normal stands; the labels correctly show the parked state.
    • REMAINS: Infra decision: register a credentialed fleet-host runner (or revisit the flag/runner decision) — then the workflow enables and the two demonstrations in the acceptance can run. Flagged for Drew's list as an infra call.
  14. added
    area/infra
    on Nov 29, 2026
  15. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Gaps found: no app//area/ label; no source/* label (filer not recorded — noted, not guessed).
    Strengths: the ask is motivated by a measured incident — the mirror had drifted to 27 missing current keys, 10 retired keys, and 2 missed rotations before #5381 caught it — and the follow-on lineage is linked (PR #5450). ## Acceptance criteria present; labels otherwise complete (kind/enhancement, priority/normal, status/triaged, work/assigned, effort/s).
    Actions: added label area/infra. Priority unchanged. No other changes.

  16. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Claim — Felix lane 0640-FX (worker felix), 2026-11-29.

    Taking the remainder after 0640-AB's premise release: the --check mode and drift-issue helper already landed on main, so the open acceptance is (1) a scheduled freshness check actually wired, and (2) the two demonstrations (deliberately stale mirror + fresh mirror, names-only output linked here). Verifying the schedule state firsthand (registry + workflows), then running the demonstrations from this seat.

  17. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Remainder adjudication — Felix lane 0640-FX, 2026-11-29. (Claim 7265270630; 0640-AB's earlier premise release stands — the implementation had landed.)

    Criterion 1 (scheduled check exists): MET. .github/workflows/bws-freshness.yml runs daily 06:23 UTC + workflow_dispatch and is recorded in doc/fleet-schedule-registry.md. The credential-free fixture-tests job runs on that schedule — the last five scheduled runs on main all concluded success (latest 46279931272, 2026-11-29).

    Criterion 2 (drift surfaces as one names-only issue per episode, as the app): MET in wiring. The live-check job opens/updates exactly one drift issue via lib/bws-freshness-drift-issue.sh and closes it when a later check finds the mirror fresh; the finder contract is covered by lib/bws-freshness-drift-issue.test.sh. It executes only when the live job is enabled (below).

    Criterion 3 (demonstrated vs stale + fresh mirrors): MET in fixture form, with fresh executed proof. lib/bws-to-sops-check.test.sh exercises the stale case (added/removed/value-changed key names, exit 1), the fresh case (exit 0), and the operational case (exit 2), with the invariant that no secret value ever reaches the output. Re-executed on current main by fleet-command run 46329106258: both suites ran to completion, zero FAIL lines in the job log, marker FX-GATE-DONE-5451 present.

    Live demonstration from this seat: attempted, blocked by the recorded gate — not by a defect. The vault side works from here (bws secret list answered with the seat's stored token; 266 secrets, key names only handled). But sops -d on the committed mirror fails on this seat — the mirror's age recipient is not held here — so a live --check exits 2 (operational) from this seat. That is exactly the enablement gate recorded on this issue (2026-11-22 runner decision) and in the schedule registry: the live leg parks on the identity-holding laptop host being registered as a runner plus BWS_FRESHNESS_ENABLED=true. That is a host/hands step, not a code slice.

    Priority validation 2026-11-29 (Felix): priority/normal concurred — exactly one band, unchanged.

    Net: no code remainder. What is left is the recorded laptop-host enablement; closing on the fixture-form demonstrations or holding for the live run is Felix's call.

  18. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · lane 1952-E (bravo SUSTAIN, queue-draw + author) — #5451 verification pass, 2026-11-29.

    Claimed for verification (prior claims are 2026-11-05 handoffs, stale). Verified firsthand against current main:

    • Criterion 1 — scheduled check exists: MET. .github/workflows/bws-freshness.yml runs on schedule (23 6 * * *) + dispatch, main-only per ci-policy. The credential-free fixture-tests job runs both contract suites nightly.
    • Criterion 2 — drift surfaces as one issue per episode, names only: IMPLEMENTED + fixture-verified. The gated live-check job opens/updates the single drift issue via lib/bws-freshness-drift-issue.sh and closes it when a later run finds the mirror fresh.
    • Criterion 3 — demonstrated against stale and fresh mirrors: MET at fixture level, run by this lane today. I fetched the four lib/ scripts from main and ran both suites locally:
      • bash 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) — the --check contract detects added/removed/value-changed key names against stubbed stale mirrors and passes a fresh mirror.
      • bash lib/bws-freshness-drift-issue.test.sh → 4/4 PASS (single-issue-per-episode finder).

    What remains open, and why this issue stays open: the live-check job is deliberately gated off (BWS_FRESHNESS_ENABLED unset, runs-on: ubuntu-latest placeholder) per the 2026-11-22 runner decision recorded in the workflow: the live check must run on the identity-holding fleet host once it is registered as a self-hosted runner — no new vault-credential copy for CI. That host (the laptop) is currently unreachable (laptop leg down, 2026-11-29), so the live demonstration + enablement cannot be done from this seat today.

    Wake condition: laptop leg restored AND the identity-holding host registered as a self-hosted runner → in one change, point live-check's runs-on at it, set BWS_FRESHNESS_ENABLED=true, dispatch once, and link the run + drift-issue behaviour here.

  19. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Premise check — lane 2007-J (Archer, charlie ADVANCE 2026-11-29), firsthand via gh contents API:

    The implementation half of this issue has landed on main; what remains is a named enablement gate, not code:

    • lib/bws-to-sops.sh --check exists: names-only freshness check vs the committed mirror, exit 1 on drift, exit 2 on operational failure (so drift is distinguishable from a broken check).
    • .github/workflows/bws-freshness.yml exists and is active: nightly schedule (23 6 * * *) + dispatch; the credential-free fixture-tests job runs the --check contract tests and the drift-issue finder tests with stubbed binaries; the live-check job carries the full open/update/close-one-drift-issue logic (names only, single issue per episode via lib/bws-freshness-drift-issue.sh).
    • The gate: live-check is disabled by design until it can run on the fleet host that already holds BWS access and the mirror's SOPS age identity. The workflow header records the runner decision on this issue (2026-11-22: run on the existing identity-holding fleet host; no new runner, no new vault-credential copy) and the 2026-11-24 verification that the org has zero registered self-hosted runners and the mirror's age recipient is not held on the Muse seat. Enablement = point runs-on at that host once registered + set BWS_FRESHNESS_ENABLED=true in the same change. Never enable while runs-on is ubuntu-latest (the check would exit 2 nightly and train everyone to ignore it).

    So acceptance criteria 1–2 are implemented and fixture-demonstrated (criterion 3's stale/fresh demonstration exists in fixture form); the live demonstration waits on the runner-surface gate above, which is host work, not a code slice. No claim taken — recording so the next lane does not re-derive this. Key: 2007-J

  20. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Claim — Archer lane 1207-G (charlie ADVANCE, 2026-11-30). Taking #5451 for a firsthand disposition pass. The only prior claim is the 2026-11-08 queue handoff chain (task 12224, parked for an opencode claimant that never bound) — stale >24h, no PR, takeover noted per the work-loop rule.

    Plan: verify the landed state firsthand (workflow, scripts, recent runs), then record exactly which acceptance criteria hold and which single gate remains, with a machine-checkable wake.

  21. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Disposition — Archer lane 1207-G (2026-11-30): implementation landed and running; the one remaining step is a named host gate, not code.

    Firsthand verification against current main this pass:

    • Scheduled check exists (criterion 1 — holds for the credential-free tier). .github/workflows/bws-freshness.yml runs on schedule (23 6 * * *) + dispatch, main-only per the 2026-11-13 CI policy. Its fixture-tests job runs lib/bws-to-sops-check.test.sh and lib/bws-freshness-drift-issue.test.sh (both present on main, verified by contents read) — recent scheduled runs all success: 2026-11-25 run 45664451279, 11-26 run 45864629272, 11-27 run 46036863873, 11-28 run 46161132629, 11-29 run 46279931272.
    • Drift surfacing (criterion 2 — implemented + contract-tested). lib/bws-to-sops.sh --check is names-only, writes nothing, exit 1 on drift (verified in the script on main). The workflow's live-check job opens or updates exactly one drift issue per episode via lib/bws-freshness-drift-issue.sh (marker-matched, comments on repeats, auto-closes when a later run finds the mirror fresh); the finder is covered by the stubbed-gh fixture tests above.
    • Demonstration (criterion 3 — holds at the contract level). The fixture suites exercise the check against stubbed stale and fresh mirrors with no credentials — that is the demonstration surface that can run in CI. A live demonstration is the gated remainder below.

    Remaining gate (the only open item): live-check is deliberately disabled (if: vars.BWS_FRESHNESS_ENABLED == 'true', runs-on: ubuntu-latest placeholder) because no registered runner surface holds both the BWS token and the mirror's SOPS age identity — per the 2026-11-22 runner decision recorded in the workflow header, the live check must run on the existing identity-holding fleet host, and the org currently has zero registered self-hosted runners. Enabling it on a GitHub-hosted runner would exit 2 nightly (no token, cannot decrypt) and train everyone to ignore it.

    Wake (machine-checkable): a self-hosted runner for developing-today/code is registered on the BWS/SOPS-identity host AND repo variable BWS_FRESHNESS_ENABLED=true is set with runs-on pointed at that host in the same change → the next scheduled bws freshness run executes the live-check job; its conclusion is the verification. Until that runner exists, this issue is parked on the host-registration step, not on any code work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/infraeffort/sepic/storagekind/enhancementmeta/enrichedpriority/normalstatus/triagedtask/triagework/assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions