Conversation
This reverts commit 564b052.
# Conflicts: # evals/validation-authority-foundation.ts # src/server/chat/security-research-runtime-context.ts # src/server/chat/securityResearchTurn.ts # src/server/research/execution-profile.ts # tests/integration/scheduler-backed-research.test.ts
|
Retargeted from Do not merge as-is. Verified against current
Good news on the two fields that looked like they had no producer: Tracked by #100. |
|
Superseded by #216, which completes this work on a fresh rebase onto current #216 builds the production resolver that was missing here (it existed only as a test stub), wires all four executing tool actions plus It also fixes a real bug the adversarial test exposed: a throwing resolver escaped Closing this draft. Branch |
) * Rebase validation authority foundation onto main Squash the PR #206 integration branch onto current origin/main (107 commits ahead) and reconcile the eval row schema: main's per-quartet matched-row validation now reads `effectiveAuthorityMode`, and the requested/effective parity check folds into the same pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Wire validation execution authority into production The authority model shipped with no production resolver: the executor's resolveExecutionAuthority was an optional dependency that only a test stub ever supplied, so every non-yolo payload denied with server-authority-not-resolved and no mode but yolo could execute. Add src/server/validation-plans/authority-resolver.ts as the production resolver. Per payload it resolves target authorization coverage from the ledger, derives task scope from that authorization, resolves a containment policy snapshot whose content-addressed id serves as both the policy decision and the containment snapshot, creates the Tool Run, and settles the durable approval: strict requires an exact operator approval covering validationPayloadApprovalIntent(planId, payloadId), auto mints and consumes its own exact one-time approval, self claims none. It never throws; every missing fact becomes a denial record. Wire it through both public seams. All four executing tool actions and the validation plan workflow now construct the resolver, and both accept a typed model decision (modelProceed / modelConfirm) so self is reachable without widening model authority. executeMastraSecurityAction now stamps the real selection into Tool Run metadata, and finding-helpers pins the authority on the plans it creates. Harden the executor so a throwing resolver denies the payload instead of aborting the run - executionApprovalGranted returns true for auto and self and relies entirely on this per-payload guard. Operators select the mode as project.settings.validationAuthorityMode, plumbed through the chat route into run metadata. Absence means strict; the mode is never inferred from approvalMode. Plans persisted before this contract carry no pin and would have hard-failed record_result and confirm. They are adopted as self with a recorded validationAuthorityMigration, preserving their original model-asserted semantics without granting a stronger claim. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Apply Biome formatting and import ordering `pnpm check` now exits 0. Fixes organizeImports in trajectory-export, authority-resolver and the two validation-authority test files, plus formatting in security-actions/execution.ts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Preserves the reviewed #158 integration without admitting it to main. The immutable profile and newer background/resume hardening are retained; authority provenance tests and typecheck pass.
Blocked: production tool/workflow call sites do not provide resolveExecutionAuthority, and the public tool does not pass the self-mode decision. Wire server-owned task scope, target authorization, policy decision and exact durable approval, then verify through the public tool seam. The four-mode paid matrix remains closed. This draft also contains the prerequisite #196/#152/#157 foundation commits; it must be refreshed after those merge. No paid model calls or human-review approvals were performed.