Repository navigation
fix(auth): preserve queued refresh credential provenance - #7457
Conversation
0254090 to
9af8823
Compare
eb1695e to
49ca62e
Compare
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — server-only credential-authorization sweep for the queued compliance-refresh path.
What I checked:
- Reviewer surfaced no blocking or medium findings (clean LGTM).
- No no-auto-approve team match;
gated_paths: false, so no hard approval gate applies. high_risk: true, but reasons are one(added)migration (591) and several(modified)route files. Per the high-risk-flag reading rules, a(modified)sensitive file with no medium-or-higher finding is presumed safe, and an(added)migration on its own is normal scaffolding. No(deleted)entries → row 3 does not fire.- No medium findings at all → rows 4, 5, 8 do not fire. No prior decision → row 6 N/A.
- Change is operational-only (no
static/schemas/source/**,dist/**, or normative docs touched), so schema↔docs coherence, oneOf, changeset-scope, artifact-immutability, and 3.1.x patch-eligibility gates are not triggered. No protocol/breaking-class change present. - Auth-posture change (authorize by exact authenticated WorkOS credential
authWorkosUserId ?? idwith fail-closed provenance and bounded external I/O) is well-covered across admission, execution, polling, admin sweep, and migration 591.
None of decision-table rows 1–8 fire → row 9 = approve.
49ca62e to
4244491
Compare
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — subsequent pass on the compliance-refresh authorization rework, clean.
The reviewer verified the delta end-to-end: credential binding uses authWorkosUserId in both admission and worker paths, the legacy-row rejection fence matches the worker's advisory-lock key, the provenance guard equals migration 591's CHECK constraint, and all external I/O is bounded (WorkOS getUser 5s race + maxRetries 0, DB lookups via withDatabaseDeadline) with authorization_unavailable retryable and revoked/provenance_missing terminal. No new critical, high, or medium findings.
Decision-table walk:
- Rows 1 — no critical/high findings.
- Row 2 — gated_paths is false; review_decision is APPROVED regardless.
- Row 3 — no
(deleted)high-risk entries (migration 591 is(added)scaffolding; registry-api.ts is(modified)with no findings). - Rows 4/5 — no medium findings at all.
- Row 6 — prior decision was
approve, notescalate. - Row 7 — no no-auto-approve team match.
- Row 8 — zero medium findings.
- Row 9 — approve.
Note: migration 591 runs automatically on startup in production and was judged as production-facing by the reviewer; the provenance guard was confirmed to match the migration's CHECK. This is a server/platform change (no static/schemas/source/** or docs/reference/** touched), so schema↔docs coherence, changeset, oneOf, and 3.1.x patch-eligibility gates do not apply.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — queued-refresh credential-provenance fix (PR1c continuation of #7411/#6827).
Server-only change with a clean reviewer pass: no Critical/High/Medium findings. Verified advisory-fence key parity, fail-closed provenance validation before coalescing, live-credential revalidation bounded to 5s at execution, error routing to 403/503, and legacy NULL-provenance rows failing closed without backfill while permitting fresh resubmission. No protocol surface touched (static/schemas/source/** untouched), so no changeset required.
Gate check:
- No no-auto-approve team match.
- gated_paths: false; review_decision: APPROVED.
- high_risk: true only from an (added) migration and a (modified) route — reviewer surfaced no medium-or-higher concern on either, so no escalation trigger. The migration under
server/src/db/migrations/**was reviewed as production-facing (runs on startup) and is fail-closed. This is not a protocol/breaking-class change. - Prior decision was approve; this run remains clean.
No rows 1–8 fire → row 9 approve.
4738f95 to
7e7809d
Compare
4244491 to
6ec7a9f
Compare
The base branch was changed.
6ec7a9f to
a65a4ff
Compare
1307b30 to
7f0edf2
Compare
a65a4ff to
be9cd83
Compare
Migration 591 was already reserved by #7457 (591_compliance_refresh_authenticated_credential.sql). Renumbering to 597, the next uncontested slot after a main/open-PR allocation audit (main tops at 590; no open PRs claim 592–596). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017jbrQJh44D9RmYbz2yM6pY
7f0edf2 to
ef6168a
Compare
Migration 591 was already reserved by #7457 (591_compliance_refresh_authenticated_credential.sql). Renumbering to 597, the next uncontested slot after a main/open-PR allocation audit (main tops at 590; no open PRs claim 592–596). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017jbrQJh44D9RmYbz2yM6pY
ef6168a to
31e43f1
Compare
be9cd83 to
310845d
Compare
0e825e3 to
7c3d8d3
Compare
* fix(registry): fail closed on supply paths with canonical shared vectors * fix(registry): preserve per-collection evidence fallback in bulk inquiries * fix(registry): persist supply-path authority and bind shared publisher evidence * fix(registry): reject malformed provenance without losing held revocations * test(registry): prove malformed provenance preserves authority pins * fix(supply-path): reject invalid authority envelopes before pin admission * fix(supply-path): refuse empty fragments in authority locations * fix(registry): renumber migration 591→597 to avoid collision with #7457 Migration 591 was already reserved by #7457 (591_compliance_refresh_authenticated_credential.sql). Renumbering to 597, the next uncontested slot after a main/open-PR allocation audit (main tops at 590; no open PRs claim 592–596). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017jbrQJh44D9RmYbz2yM6pY * fix(registry): remove old migration 591 (superseded by 597) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017jbrQJh44D9RmYbz2yM6pY * fix(db): reserve supply-path provenance migration 597 * docs(db): record verified migration 588 through 597 composition * style(registry): remove trailing contract blank line * docs(db): refresh migration allocation audit after main advances * test(addie): stabilize PostgreSQL ledger race barriers * fix(registry): harden supply-path cache admission --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
7c3d8d3 to
cf5c79e
Compare
9b82d0d to
b7e8254
Compare
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — subsequent pass, no findings.
This is a follow-up review to a prior clean approve. The only delta since the last run is the migration allocation correction: renaming the compliance-refresh authenticated-credential migration to 599_compliance_refresh_authenticated_credential.sql. The reviewer verified 599 is a free, valid slot (base main tops out at 598, with gaps at 588/592-596), all references (file, migration-number diagnostic, integration-test readFileSync path) point consistently to 599, the stale #7457/591 comment in registry-api.ts was removed, and the migration's mixed-version gate semantics are unchanged.
No new findings; no critical/high/medium concerns surfaced. High-risk flag is true only due to a new migration file (added) and modified route files under server/src/routes/**, but the reviewer found no medium-or-higher concerns on any of them — modifications are presumed safe per the change-kind guidance. No deletions in sensitive paths.
Decision table: rows 1-8 do not fire (no findings, gated_paths false, no deletions, no medium findings, no team gate, prior decision was approve not escalate). Falls through to row 9 → approve.
…the refresh fence tracking issue (#7648) * fix(registry): serve explicit heartbeat requeues first and reference the refresh fence tracking issue Requeue comply only cleared next_compliance_check_at while the heartbeat batch orders by last_checked_at ASC NULLS FIRST, so an agent with a recent authoritative run never moved forward. Record requeued_at on requeue, order by it first, and clear it when an authoritative run is published. The human refresh 503 and refresh_availability now carry tracking_issue (#7457) so owners can follow the fence. Closes #7632 Claude-Session: https://claude.ai/code/session_01EhqPiLqfuPcPa15YGbUtpz * fix(db): renumber heartbeat requeue migration * ci: run checks after review readiness --------- Co-authored-by: Brian O'Kelley <bokelley@scope3.com>
Queued compliance refreshes remain bound to the exact human credential that authorized admission. This PR persists that credential and its authorization epoch, re-proves the current WorkOS identity, and checks authorization across sensitive continuations and canonical writes.
Dependency and merge order: #7450 → #7452 → #7457. Keep this PR Draft, auto-merge disabled, and unmerged on
conductor/secure-web-admin-credential-sweep. No maintainer renewal, merge, deployment, or issue closure is authorized.Current head and lineage
9b82d0da9a29d614edb33aec0ed490f76ca65254; exact tree:aad38bde1e6146e99aab1b66259d3ba39efa27e8.310845d7958f4695a94b4a89920856ef90ae55b4remains on its original local parent31e43f16d1ba3d157ba1022ee6d2203bd3d958df. This update adds only the independently reviewed migration allocation correction: 2 logical files, +3/-3.7c3d8d3a48963928a79ce37be75b77e33c635662. This update does not replay the queue onto that parent. GitHub reports 91 files, +7,693/-1,008, DIRTY/CONFLICTING against the current base because of inherited divergence. The PR comparison is not yet a qualified restack.310845d7958f4695a94b4a89920856ef90ae55b4. No landed migration is renamed, rewritten, or removed.Migration allocation correction
Main
dc69e0b2264b4c563f2175a48c515b7108dbb4f6permanently contains591_enable_verification_profile_comparisons.sqlfrom merged #7542 and597_supply_path_manifest_provenance.sqlfrom merged #7544. The unmerged queue migration moves to599_compliance_refresh_authenticated_credential.sql.591_enable_verification_profile_comparisons.sql(#7542); immutable597_supply_path_manifest_provenance.sql(#7544); immutableThe live public/current private allocation audit was rechecked before publication and found no competing 599 claim. The correction renames the SQL file, updates one migration-number diagnostic, and updates the existing integration test's filename reference and pre-migration comment. All 99,721 unaffected tracked blobs/modes are identical. All runtime code and SQL enforcement semantics are unchanged. New SQL blob:
de8d612c56b4838f903f22f0efa462a7ca90da07; SHA256:ac112531a7e409d898282d670495553cb7064fa5b917887045c3c2ad97b92de4. No protocol release surface changed, so no changeset is required.Security invariants
__unproven__provenance for legacy histories. Credential and fingerprint columns are NOT NULL without defaults. Sentinel rows cannot execute; old inserts and old worker claims fail closed, including claims against valid new jobs. Fresh valid requests can be submitted after legacy rejection.authWorkosUserId ?? idprincipal. Canonical linked IDs, stale local email, and requestisAdmincannot substitute for exact credential authorization. Static administrators cannot enqueue or execute queued refreshes.Exact-tree local qualification
CI registration history and current hold
On 2026-09-14 the coordinator authorized a temporary main retarget for old head
310845d7958f4695a94b4a89920856ef90ae55b4, pinned main2da35544ffb7257861324786a33cae9db0457bac, and then-parent31e43f16d1ba3d157ba1022ee6d2203bd3d958df. Retarget was confirmed at 22:19:58 UTC; the guard stopped at 22:20:04 on the inherited #7529/#7450 conflict inserver/src/addie/generated/tool-surface-inventory.generated.json. Base was restored at 22:20:05, verified at 22:20:09, and independently audited at 22:21:21. No full CI workflows registered from that attempt.The inherited local storyboard qualification is unchanged: the earlier default advisory matrix encountered the documented cache-version mismatch (
3.2.0-rc.3versus seller capability through3.2-rc.1). The earlier publication used the documentedADCP_SKIP_STORYBOARD_MATRIX=1rerun, neverHUSKY=0; neither local storyboard matrix is claimed passing. Old-head CI and approvals do not qualify this new head.Fresh exact-head checks: IPR Agreement and the exact-head IPR Policy / Signature status passed. Check Migration Numbers passed on this exact head via its supported manual trigger; workflow-dispatch mode checks the branch inventory, while the current-main union and byte preservation are covered by the local qualification above. GitGuardian passed. Ladon and Mintlify checks are skipped; neither is human approval. All currently registered checks are terminal. Full Build Check/test CI remains absent for this stacked base.
Hold for corrected #7450 → #7452 replay and terminal required exact-head CI. The current stacked base does not trigger Build Check under its branch filters; no retarget or workflow/source change is included in this allocation correction. Independent human approval remains required before any merge. No maintainer renewal is requested by this update.
Open workspace in Conductor