Skip to content

fix(addie): distinguish matched-v4 estimates from settlement - #7401

Merged
bokelley merged 1 commit into
mainfrom
conductor/matched-v4-estimate-ledger-semantics
Sep 10, 2026
Merged

bokelley merged 1 commit into
mainfrom
conductor/matched-v4-estimate-ledger-semantics

Conversation

@bokelley

@bokelley bokelley commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add external, fail-closed migration 585 that refuses existing custody evidence and renames response/usage terminal recording fields and API
  • require transformed 584+585 evaluator schema before ordinary migration recording or a protected admission
  • preserve unknown-exposure recovery; keep provider-authoritative cost reconciliation aggregate-only and reports pending
  • add focused unit, migration-smoke, workflow, and runbook coverage

Verification

  • npx tsc --project server/tsconfig.json --noEmit
  • npx vitest run server/tests/unit/migrate.test.ts server/tests/unit/addie/matched-v4-runtime-surface.test.ts server/tests/unit/addie/matched-v4-provider-billing-reconciliation.test.ts --reporter=dot (44 passed)
  • git diff --check
  • Prettier check for changed formatted files

The broad matched-v4 evaluator unit file was attempted but retained its known non-terminating router-fixture behavior after starting; the focused relevant checks above completed green. No database, provider, cloud, credential, or role action was performed.


Open workspace in Conductor

@aao-secretariat aao-secretariat 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.

Ladon verdict: Request changes

Request changes — 1 blocking finding.

Blocking findings

  • server/src/db/migrations/585_addie_matched_v4_record_estimated_cost.sql — Post-transform attestation expects 6 pg_constraint rows on addie_matched_v4_private_attempts, but the table actually has 11. Every apply raises "transformed custody schema is partial or tampered" and rolls back (confirmed by both red migration-smoke-test jobs). Migrations run automatically on startup in production, so this would break deploys. Fix the expected constraint count (or the assertion logic) to match reality.

Notes

  • Verified the settle→recordResponseUsage vocabulary rename is complete across custody.ts / SQL / workflows / runbook / tests, and that migrate.ts requires both 584 and 585 before recording either.
  • No protocol changeset needed — this is Addie/migration-only, outside the published wire surface.
  • Low (non-blocking): migrate.ts leaves the old attestation body as unreachable dead code after an early return.

Note: gated_paths is true (workflow files) with review_decision: REVIEW_REQUIRED, so this PR also could not auto-approve regardless — human/CODEOWNERS review of the .github/workflows/** changes is still required.

Blocking findings

  • server/src/db/migrations/585_addie_matched_v4_record_estimated_cost.sql — Post-transform attestation expects 6 pg_constraint rows but the table has 11, so every apply rolls back with 'transformed custody schema is partial or tampered' (both migration-smoke-test jobs red); breaks production startup migrations

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch 2 times, most recently from a024742 to 7ea96ae Compare September 10, 2026 06:45
@aao-secretariat
aao-secretariat Bot dismissed their stale review September 10, 2026 06:54

Superseded by a later Ladon review that rechecked and resolved its blocking findings.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Request changes

Request changes — 1 blocking finding.

Blocking findings

  • server/src/db/migrations/585_addie_matched_v4_record_estimated_cost.sql:521 — Migration Smoke Test job "Built migrations against Postgres" is still FAILURE on head 7ea96ae. Migration 585's hand-computed self-attestation digests do not match the schema it produces; a mismatch rolls back the single-transaction apply. Since 585 runs on production startup and gates post-merge admission, this blocks deploys.

This is a reproducible failure on a load-bearing, production-facing migration path (migrations run automatically on startup) — High severity, decision-table row 1 (request-changes). The settle→recordResponseUsage rename is complete across custody.ts/SQL/tests/runbook and no protocol changeset is required (Addie/migration-only, outside the published wire surface), so those are not blockers.

Note: gated_paths is true (.github/workflows/** modified) and review_decision is not APPROVED; the workflow gate is not satisfied, but the row-1 blocker takes precedence and produces request-changes regardless.

Blocking findings

  • server/src/db/migrations/585_addie_matched_v4_record_estimated_cost.sql:521 — Migration Smoke Test 'Built migrations against Postgres' still FAILURE on head; 585 self-attestation digest mismatch rolls back single-transaction apply and blocks production startup/admission gate

@aao-secretariat aao-secretariat 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.

Ladon verdict: Request changes

Request changes — 1 blocking finding.

Blocking findings

  • server/src/db/migrations/585_addie_matched_v4_record_estimated_cost.sql — Migration Smoke Test "Built migrations against Postgres" is FAILURE at head a024742. The 585 transform/attestation was rewritten from a constraint-count check to a pinned MD5 catalog projection but still does not attest the transformed schema in CI. Migrations under server/src/db/migrations/** run automatically on startup in production, so a failing smoke test on this path is not deployable (High).

The settle→recordResponseUsage rename is complete and consistent across the changed files, and no changeset is required (Addie/migration-only surface, out of published-protocol scope). This is the only remaining blocker; the prior run had no findings and this run surfaces one High.

Row 1 of the decision table fires on the High finding → request-changes. (Note: gated_paths is true with review_decision CHANGES_REQUESTED, which independently precludes approve.)

Blocking findings

  • server/src/db/migrations/585_addie_matched_v4_record_estimated_cost.sql — Migration Smoke Test failing at head; 585 transform/attestation does not attest transformed schema in CI, and migrations run on startup in production, so it is not deployable (High)

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch 3 times, most recently from 67b70e8 to f3243a3 Compare September 10, 2026 07:31
@aao-secretariat
aao-secretariat Bot dismissed stale reviews from themself September 10, 2026 07:37

Superseded by a later Ladon review that rechecked and resolved its blocking findings.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated paths touched without an approving review.

This PR modifies three files under .github/workflows/** (build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml), which are under a hard, deterministic approval gate (gated_paths: true). The required review status is unknown/none — not APPROVED — so decision-table row 2 fires and the outcome must be escalate.

No blocking findings: the reviewer's third pass confirms the sole prior blocker (Migration Smoke Test red from 585 not attesting its transformed schema) no longer reproduces — 585 is now wired into build-check.yml and migration-smoke-test.yml, and the migration job has progressed past the 585-apply step without a digest mismatch. The 585 transform was verified against base 584 constraint/column names, and the settle→recordResponseUsage rename is self-contained. Change is Addie/migration-only with no published wire surface, so no changeset is required. No Critical/High/Medium findings remain.

Human/CODEOWNERS review of the gated workflow files is required before this can merge.

Why human review

  • Touches gated workflow files (.github/workflows/build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) under a hard approval gate while review_decision is not APPROVED — human/CODEOWNERS review required.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Sep 10, 2026
@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch 2 times, most recently from e7f7de2 to 4d568c3 Compare September 10, 2026 07:52

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files touched without an APPROVED review decision.

This PR renames matched-v4 terminal-record vocabulary (settle→record_response_usage) via migration 585, with parallel TS/workflow/runbook changes. The reviewer verified the migration's forward transform and migrate.ts re-attestation are fail-closed at every branch, the rename is complete and consistent, and smoke-test additions harden the boundary. No Critical/High/Medium findings; one non-blocking note that the broad matched-v4-evaluation.test.ts is validated only in CI.

Despite the clean diff, this PR modifies files under a hard, non-overridable approval gate and review_decision is not APPROVED, so it cannot auto-approve (decision table row 2).

Escalation reasons

  • Touches gated workflow files under .github/workflows/** (build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) while review_decision is unknown/not APPROVED — human/CODEOWNERS review required to satisfy the gate.

No blocking findings; the escalation is purely the unsatisfied hard approval gate. Once a human/CODEOWNERS approval is recorded, this can fall through to a normal approve on the clean diff.

Why human review

  • Touches gated workflow files under .github/workflows/** (build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) while review_decision is not APPROVED — human/CODEOWNERS review required to satisfy the hard approval gate.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR modifies three files under .github/workflows/**, which are under a hard, deterministic approval gate (gated_paths: true), and the current review_decision is not APPROVED. Per decision-table row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded.

Escalation reasons

  • .github/workflows/build-check.yml (modified) — gated path under hard approval gate
  • .github/workflows/migration-smoke-test.yml (modified) — gated path under hard approval gate
  • .github/workflows/provision-matched-v4-evaluator.yml (modified) — gated path under hard approval gate
  • Review decision is unknown/not APPROVED — human/CODEOWNERS review required.

Note on the review substance: the reviewer surfaced no critical/high/medium findings. Migration 585 is fail-closed (refuses to transform when custody tables are non-empty), migrate.ts records 584/585 only after the transformed-schema attestation, and the smoke test adds adversarial transform coverage. The prior escalation was on the same gated-path basis; it persists solely because the gate is still unsatisfied, not because of new findings. This gate lifts automatically once review_decision becomes APPROVED.

Why human review

  • Touches gated workflow files (.github/workflows/build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) under a hard approval gate while review_decision is not APPROVED — human/CODEOWNERS review required.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch 2 times, most recently from 4e79f3c to 7faaca2 Compare September 10, 2026 08:06

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files touched under a hard approval gate with review_decision not APPROVED.

This PR modifies files under .github/workflows/**, which are declared under a hard, deterministic approval gate (gated_paths: true). The current GitHub review_decision is unknown/none, not APPROVED, so decision-table row 2 fires: the gate is not satisfied and Ladon cannot auto-approve or plain-comment until a human/CODEOWNERS approval is recorded.

The reviewer found no Critical/High/Medium findings — the settlement→response/usage vocabulary rename across the sealed matched-v4 evaluator and attested forward migration 585 (fail-closed, empty-custody prerequisite, ACCESS EXCLUSIVE + READ COMMITTED) read cleanly. This mirrors the prior escalate decision, which is preserved here purely by the unsatisfied path gate, not by any actionable finding.

Escalation reasons

  • Touches gated workflow files (.github/workflows/build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) under a hard, non-overridable approval gate while review_decision is not APPROVED — human/CODEOWNERS review required.

Why human review

  • Touches gated paths under a hard approval gate — .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) — and review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated paths under a hard approval gate, review not yet APPROVED.

This PR modifies three files under .github/workflows/**, a path the repo declares under a hard, non-overridable approval gate (gated_paths: true). The current review_decision is unknown/none, not APPROVED, so decision-table row 2 fires: Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Escalation reasons

  • Touches gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.

The reviewer reported a clean pass: the matched-v4 evaluator rename (settle/settled/cost_microdollars → record_response_usage/response_usage_recorded/estimated_cost_microdollars/terminal_recorded_at) is consistent across TypeScript, migration 585 SQL, the runbook, and tests, with verified 585 constraint/function coherence, migrate.ts attestation and 584→585 advisory-lock ordering, complete rename with no broken out-of-diff consumers, and correctly-absent changeset for this Addie/operational surface. No Critical/High/Medium findings — but the workflow gate stands until a human approval is recorded.

Why human review

  • Touches gated paths under a hard approval gate — .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) — and review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch from 7faaca2 to 03c45da Compare September 10, 2026 08:17

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated paths under a hard approval gate are touched and review_decision is not APPROVED.

This PR is a clean vocabulary refactor (settle/settled/costMicros → recordResponseUsage/response_usage_recorded/estimatedCostMicrodollars) plus a new operator-only forward migration 585 transforming the sealed matched-v4 evaluator schema. The reviewer found no Critical/High/Medium findings (only a Low dead type-union arm, non-blocking). The prior escalation held on the same gated-paths trigger, and it persists.

Escalation reasons

  • Touches gated paths under a hard, non-overridable approval gate — .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) — and review_decision is not APPROVED. Human/CODEOWNERS approval is required before this can merge.

Decision-table trace: Row 1 no (no critical/high). Row 2 fires — gated_paths: true AND review_decision ≠ APPROVED → escalate. The gate lifts the moment a real human/CODEOWNERS approval is recorded; nothing in the diff quality overrides it.

Why human review

  • Touches gated workflow files under a hard approval gate — .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) — and review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch 2 times, most recently from 881aef0 to 44712b2 Compare September 10, 2026 08:35

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR modifies three files under the hard approval gate (.github/workflows/**) and review_decision is not APPROVED, so the deterministic gated-paths gate (row 2) fires and blocks auto-approval regardless of how clean the diff is.

The reviewer reported a clean pass: no Critical/High/Medium code-correctness findings. Migration 585 transforms the sealed matched-v4 evaluator schema with a fail-closed zero-evidence gate, correct ACCESS EXCLUSIVE + READ COMMITTED serialization, internally consistent digests between the 585 SQL and migrate.ts, and 42501 handling matching the runbook's no-CREATE runtime model. The eval TS rename, tests, and changeset scope were verified.

Blocking findings

  • None.

Escalation reasons

  • .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) are under a hard, non-overridable approval gate and review_decision is not APPROVED. A human/CODEOWNERS approval must be recorded before merge.

This matches the prior escalate decision; the gate persists purely because the required review status has not yet been recorded, not due to any new code concern.

Why human review

  • Touches gated workflow files under a hard approval gate — .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) — and review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files under a hard approval gate; human/CODEOWNERS review required.

The diff modifies three files under .github/workflows/**, a deterministic hard approval gate (gated_paths: true), and review_decision is not APPROVED (unknown/none). Per decision table row 2, this cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Escalation reasons

  • Touches gated workflow files under a hard approval gate — .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) — and review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.

The reviewer reported a clean pass with no blocking or medium findings. Migration 585 (rename to record_response_usage + cost_microdollars/settled_at) is fail-closed, advisory-lock serialized, and covered by unit and migration-smoke tests. No spec-drift, changeset-scope, oneOf, or artifact-immutability concerns. Once a human/CODEOWNERS approval is recorded, this PR would fall through to approve.

Why human review

  • Touches gated workflow files under a hard approval gate — .github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml (all match .github/workflows/**) — and review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch from 44712b2 to 89a3081 Compare September 10, 2026 08:47

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR modifies files under a hard, non-overridable approval gate (.github/workflows/**) and the current review decision is not APPROVED, so the gate is not satisfied (decision table row 2).

No blocking or medium findings were reported. The reviewer confirmed a clean pass: the settlement→response/usage-recording rename is fully propagated across the sealed matched-v4 surface and its tests; migration 585 is fail-closed (operator-only, ACCESS EXCLUSIVE legacy transform, refuses to relabel non-empty custody); and migrate.ts's attestation rewrite plus the USAGE-only createMigrationsTable fallback both fail closed. No changeset is required (Addie/app/migration/operational scope; no static/schemas/source/** or dist/** touched).

Escalation reasons

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under a hard approval gate; review_decision is not APPROVED. Human/CODEOWNERS approval required before merge.

Why human review

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under a hard approval gate and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch from 89a3081 to bd31b6a Compare September 10, 2026 08:55

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files under a hard approval gate, review_decision not APPROVED.

This PR modifies three files under .github/workflows/**, a deterministic hard approval gate (gated_paths: true), and the current review_decision is unknown/none — not APPROVED. Per decision rule row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

The reviewer found no critical/high/medium code-correctness defects: the change is a consistent settle→record_response_usage / cost→estimated_cost rename plus new fail-closed migration 585, ties out end-to-end across TS call sites, tests, DDL, and migrate.ts's inline catalog attestation. This matches the prior run's clean assessment. The escalation is purely a governance/operator-boundary matter, not a defect.

Escalation reasons

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under a hard, non-overridable approval gate and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.

Why human review

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under a hard approval gate (.github/workflows/**) and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch from bd31b6a to 3c2b05b Compare September 10, 2026 09:08

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files touched under a hard approval gate and review_decision is not APPROVED.

The reviewer reported a clean pass: a consistent settle→record-response-usage / cost→estimated-cost rename across producer and consumer with no dangling references, plus operator-only migration 585 transforming the sealed matched-v4 evaluator schema. migrate.ts records 584/585 under a shared advisory lock, fail-closed, with the createMigrationsTable 42501 fallback and lock ordering tested. No protocol surface (static/schemas/source, docs/reference, dist, package.json) is touched, so no changeset is required. No Critical/High/Medium findings.

However, this PR modifies files under .github/workflows/**, a deterministic hard approval gate (gated_paths: true), and review_decision is unknown/not APPROVED. Per decision rule row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded — the clean diff cannot override this gate.

Escalation reasons

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.

Why human review

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under the hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch 3 times, most recently from 8a78261 to 9831bdf Compare September 10, 2026 09:24

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR modifies three files under the hard approval gate .github/workflows/** (build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) and review_decision is not APPROVED (currently unknown). Per decision-table row 2, gated_paths: true AND review_decision ≠ APPROVED forces escalation — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

The reviewer's pass was clean: no critical/high/medium findings. The change is a fail-closed vocabulary correction plus schema transformation (matched-v4 evaluator rename to recordResponseUsage/response_usage_recorded/estimatedCostMicrodollars) with migration 585 refusing to relabel existing custody evidence, verified constraint↔API coherence, consistent md5 digests across migrate.ts and 585, correct advisory-lock serialization, and complete rename consistency across the six eval TS files (tsc passing). No changeset needed (Addie/migration-only, not published protocol surface).

Escalation reasons

  • Modifies gated workflow files under hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.

Once a human/CODEOWNERS approval is recorded, this PR falls through to a normal (likely clean) approval.

Why human review

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under the hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR modifies files under the hard, non-overridable approval gate .github/workflows/** and the current review_decision is not APPROVED (unknown/none). Per decision-table row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded.

Escalation reasons

  • Touches gated paths under .github/workflows/** (build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) with review_decision ≠ APPROVED — human/CODEOWNERS review required before merge.

Findings: Clean pass. The reviewer confirmed migrate.ts (584+585 routed through the transformed-schema attestation with pg_advisory_xact_lock serialization and the fail-closed ledger fix), the 585 migration (refuses non-empty custody tables, ACCESS EXCLUSIVE + READ COMMITTED on the legacy transform, coherent terminal/reconcile logic), the coherent settle→recordResponseUsage / costMicros→estimatedCostMicrodollars rename across the eval TS files, and the migration-smoke adversarial fixtures. No Critical/High/Medium code-correctness findings; no changeset required (server/workflows/runbook only, no wire surface). The migration and Addie eval files match high-risk globs but are (added)/(modified) with no medium-or-higher findings, so they are not independently escalation-worthy — the gated workflow paths are the sole blocker.

Why human review

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under the hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch from 9831bdf to 7080f27 Compare September 10, 2026 09:30

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR renames the matched-v4 "settlement" vocabulary to "response/usage recording" across TS/SQL/tests/workflows/runbook and adds fail-closed forward migration 585. The reviewer found no Critical/High/Medium correctness defects (clean pass).

However, the PR modifies files under the hard, path-based approval gate .github/workflows/** and review_decision is not APPROVED (currently unknown). Per decision-rule row 2, this forces escalation until a human/CODEOWNERS approval is recorded — no matter how clean the diff is.

Gated files requiring human/CODEOWNERS review:

  • .github/workflows/build-check.yml
  • .github/workflows/migration-smoke-test.yml
  • .github/workflows/provision-matched-v4-evaluator.yml

Additionally, the repo's security-posture/role-boundary governance for this Addie authority change independently calls for a human sign-off.

No blocking correctness findings; escalation is purely for the required approval gate.

Why human review

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under the hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • Security-posture/role-boundary change to Addie's authority model warrants explicit human review per repo governance.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch from 7080f27 to 2a9ed93 Compare September 10, 2026 09:34

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR modifies files under the hard, non-overridable approval gate .github/workflows/** and the current review decision is not APPROVED. Per decision rule row 2 (gated_paths true AND review_decision ≠ APPROVED), the outcome must be escalate until a human/CODEOWNERS approval is recorded — regardless of how clean the diff is.

The reviewer found no Critical/High/Medium findings: the matched-v4 rename (settle→recordResponseUsage, costMicros→estimatedCostMicrodollars, status "settled"→"response_usage_recorded") is complete with no stranded call sites; migration 585 is fail-closed, idempotent on retry, refuses non-empty custody evidence under ACCESS EXCLUSIVE/READ COMMITTED, and its terminal_recording_check matches runtime writes; migrate.ts pins both 584/585 shapes and serializes attestation via pg_advisory_xact_lock. The diff is mechanically clean.

Escalation reasons

  • Modifies gated workflow files (.github/workflows/build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) under the hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.

Why human review

  • Modifies gated workflow files under the hard approval gate .github/workflows/** (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR modifies three files under the hard approval gate .github/workflows/**, and review_decision is not APPROVED (currently unknown/none). Per decision-table row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded — regardless of how clean the diff is.

The reviewer reported a clean pass: a complete, symmetric estimate-vs-settlement rename across the matched-v4 evaluator; migration 585 is fail-closed (ACCESS EXCLUSIVE + READ COMMITTED, read-only re-attestation on retry) and refuses to relabel existing custody evidence; migrate.ts's all-SQL attestation rewrite and the 584→585 advisory-lock serialization are internally consistent and CI-self-checking. No changeset needed (Addie/migration-only). No Critical/High/Medium findings confirmed. One non-blocking follow-up: runtime loses CREATE on public, so confirm the deploy re-grants it transiently for any future ordinary DDL migration.

There are no blocking findings, but the gate stands until approval is recorded.

Escalation reasons

  • Modifies gated workflow files under the hard approval gate .github/workflows/** (build-check.yml, migration-smoke-test.yml, provision-matched-v4-evaluator.yml) and review_decision is not APPROVED — human/CODEOWNERS review required before merge.

Why human review

  • Modifies gated workflow files under the hard approval gate .github/workflows/** (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley force-pushed the conductor/matched-v4-estimate-ledger-semantics branch from 2a9ed93 to 6910bbe Compare September 10, 2026 09:48

@aao-secretariat aao-secretariat 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.

Ladon verdict: Escalate to human review

Escalate — gated workflow files require human/CODEOWNERS approval.

This PR is a clean internal rename-and-harden of the sealed Addie matched-v4 evaluator ledger (settle→record_response_usage, cost_microdollars→estimated_cost_microdollars, settled_at→terminal_recorded_at) across SQL migration 585, migrate.ts, and the matched-v4 TS eval module, plus a new operator-only forward migration that fails closed on non-empty custody state. The rename is complete, new tests cover the added branches, and no protocol wire surface is touched (no changeset correctly absent). The reviewer found no Critical/High/Medium findings.

However, this PR modifies files under .github/workflows/**, which is a hard, non-overridable approval gate (gated_paths: true). review_decision is not APPROVED (unknown/none), so decision-table row 2 fires: the gate is not satisfied and Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is. This matches the prior escalate decision, which stands.

Escalation reasons

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under the hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS review required before merge.

Why human review

  • Modifies gated workflow files (.github/workflows/build-check.yml, .github/workflows/migration-smoke-test.yml, .github/workflows/provision-matched-v4-evaluator.yml) under the hard approval gate .github/workflows/** and review_decision is not APPROVED — human/CODEOWNERS approval required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/build-check.yml (modified) matches .github/workflows/**; .github/workflows/migration-smoke-test.yml (modified) matches .github/workflows/**; .github/workflows/provision-matched-v4-evaluator.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley merged commit 4fceb12 into main Sep 10, 2026
38 checks passed
@bokelley
bokelley deleted the conductor/matched-v4-estimate-ledger-semantics branch September 10, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant