Retire pairwise BC4↔BC5 canary; keep single-backend BC5 live canary

Merged
JE
4mo ago
+187-1806

Why

make check fails on 7 zizmor secrets-outside-env findings in live-canary.yml (real-account secrets read in step-level env: without an environment:). Chasing that surfaced a deeper issue: the workflow (added in #308) is a pairwise BC4↔BC5 forward-compat canary, but BC5 has replaced BC4 in production (COORDINATION.md: "there is no live BC4 backend"). With one backend, both passes capture identical snapshots and the comparison passes vacuously — a nightly false green that tests nothing.

The one live rule it carried (the memories additive-only waiver) is already settled by documented contract (bc3 #11628: BC5 ships memories: [] permanently).

What

Simplify to a single-backend live canary against production BC5 — preserving the durable value (live schema validation, extras-observed forward-compat reporting, 4-language wire-decode consistency) and removing the now-vacuous pairwise machinery. The zizmor fix (scope secrets behind a branch-gated basecamp-canary environment) still applies, now with a smaller secret set.

  • Workflow — single-backend BC5 canary; job bound to the basecamp-canary environment (clears all 7 findings); secrets are the CANARY_BASECAMP_* set (no BC5_HOST), provisioned as environment secrets on that environment so the credential is scoped to this job (an org/repo secret would be readable by any workflow in the repo); runs make conformance-canary.
  • Makefile — check-bc5-compat → conformance-canary (one conformance-live pass, BASECAMP_BACKEND=production; hardened rm -rf guard preserved); deleted check-compare-canary and dropped it from make check.
  • Scripts — deleted compare-canary-runs.sh + its unit test.
  • Fixture — dropped pairwiseAssertions on GetMyNotifications; kept liveAssertions.
  • Docs — retired the pairwise narrative in CONTRIBUTING.md / COORDINATION.md / the api-gap record; kept the memories: [] contract (now settled by documentation).

Verification

  • make lint-actions (zizmor) → No findings (original 7 cleared)
  • actionlint .github/workflows/live-canary.yml → OK
  • make conformance-canary without secrets → exits with a clear required-env message (graceful, matching the workflow no-op gate); make -n dry-runs cleanly
  • make validate-api-gaps → clean

Follow-up (parked — not in this PR)

Blocked on Basecamp personal access token support. Running the canary in CI requires an OAuth token in a secret, and Basecamp has no PAT/service-token story yet — a user OAuth token in CI is a no-go. So provisioning is parked until that lands, not merely waiting on an admin.

When it's unblocked: create the basecamp-canary environment (default-branch policy, no required reviewers) and provision CANARY_BASECAMP_TOKEN / CANARY_BASECAMP_ACCOUNT_ID / CANARY_BASECAMP_HOST as environment secrets on that environment — not org/repo secrets. Per review (cubic P1), only environment secrets scope the credential to this job; an org/repo secret of the same name would be readable by any workflow in the repo, so the environment would gate the job but not the secret. CANARY_BASECAMP_* stays a cross-repo naming convention (each app on its own <app>-canary environment), not a shared org secret.

Until then the canary no-ops gracefully (missing secrets → clean skip), so this PR is safe to land and simply leaves the canary dormant. The zizmor fix and the pairwise retirement stand on their own.

The pairwise engine remains recoverable from git history (#308) if a reachable legacy backend ever warrants restoring it.


Summary by cubic

Retires the BC4↔BC5 pairwise canary and replaces it with a single-backend live canary against production BC5. Pins the backend label to bc5, removes the false-green nightly, clears the 7 zizmor findings, and keeps live schema validation and 4-language decode checks.

  • Refactors

    • Workflow: run make conformance-canary; job bound to the basecamp-canary environment; secrets are environment-scoped CANARY_BASECAMP_*; no BC5_HOST; clears all 7 zizmor findings.
    • Makefile: add conformance-canary; pin BASECAMP_BACKEND=bc5 inside the sub-make to prevent override; remove check-bc5-compat/check-compare-canary; update make check; keep the hardened rm -rf guard.
    • Schema: reject pairwiseAssertions in conformance/schema.json to prevent dead pairwise rules; recovery noted in docs.
    • Scripts: delete scripts/compare-canary-runs.sh and its unit test.
    • Fixtures/Docs: update GetMyNotifications to reflect live-call + schema-validate only; clarify BASECAMP_HOST is optional only for conformance-typescript-live (canary/CI require it); tighten environment-gating wording; note bubble_ups/scheduled_bubble_ups are modeled (not extras-observed); document that BASECAMP_BACKEND defaults to unknown when unset and that disables only per-backend overrides — generic BASECAMP_<FIXTURE> overrides still apply; the canary requires bc5.
  • Migration

    • Create the basecamp-canary environment (default-branch policy as desired).
    • Add environment secrets on that environment: CANARY_BASECAMP_TOKEN → BASECAMP_TOKEN, CANARY_BASECAMP_ACCOUNT_ID → BASECAMP_ACCOUNT_ID, CANARY_BASECAMP_HOST → BASECAMP_HOST.
    • Until provisioned, the canary no-ops safely.