Skip to content

fix(agent-runtime): bind procedural decision outcome to signed envelope - #596

Merged
seonghobae merged 5 commits into
mainfrom
feat/procedural-durable-history-20260910
Sep 10, 2026
Merged

fix(agent-runtime): bind procedural decision outcome to signed envelope#596
seonghobae merged 5 commits into
mainfrom
feat/procedural-durable-history-20260910

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

Repair an Agent Runtime evaluation-authority ambiguity discovered before durable procedural rejection-history work. Two locally admitted decisions can bind the same graph/context/paired receipts while differing only because the candidate's deterministic rejection key is already durably rejected. The prior evaluation-envelope digest did not bind that disposition, so one separately signed envelope identity could otherwise be reused across validation_non_regression / eligible and previously_rejected / ineligible decisions.

Reality RED and repair lineage

Test-first exact f6361246975872f348484e445d02a00cf805bcf1 constructs both decisions with the same graph/evidence identities, proves their disposition differs, and requires different evaluation-envelope digests plus fail-closed cross-admission. Its hosted application run 34474813711 reached the release tests step but was cancelled after the causal successor was pushed, so it is not claimed as terminal hosted RED. The test is a deterministic source-level regression against the predecessor digest implementation.

Minimal causal source exact 6e9c18a654d170cb1faaabbdf510c70c34d45e6f binds rejectionKey, screening reason, and eligibleForApproval into the envelope identity and retains the same fields in admitted evidence. That exact earned application CI, reviewer-ci, central Security Scan, and patch-validator-image SUCCESS before the documentation/test-currentness follow-ups. CHANGELOG.md now records the behavior change without altering historical entries; the focused test also asserts the retained rejection/disposition identity.

Boundary

activationAuthorized:false and process-local admission remain unchanged. This PR does not add State / Checkpoint persistence, Policy / Approval, Keyverse key discovery/custody, provider routing, graph publication, or a second Workflow / Task/lifecycle truth. Keyverse currently has no immutable GitHub Release available for production trust-selection wiring, so mutable sibling source is not consumed here.

This PR remains Draft until the complete current head has no valid unresolved review finding/thread and application CI, reviewer-ci, central Security Scan, and patch-validator-image are terminal GREEN on the same exact head. Predecessor GREEN is not transferable.

Summary by CodeRabbit

  • 개선 사항
    • 절차적 평가 결과에 거부 사유와 거부 이력이 반영됩니다.
    • 동일한 후보·영수증 정보라도 승인 가능 여부나 거부 이력이 다르면 별도의 평가 증거로 처리됩니다.
    • 이전 거부 이력이 있는 후보는 부적격으로 정확히 판정됩니다.
    • 평가 증거에 포함된 거부 및 판정 정보가 일관되게 유지되어, 서로 다른 결과에 동일한 서명된 평가 전달이 재사용되지 않습니다.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 875c3dde-6d37-44fb-843f-ab47405975f3

📥 Commits

Reviewing files that changed from the base of the PR and between 7cc7b9c and 99f4505.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/agent-runtime/procedural-evaluation-authority.ts
  • test/procedural-evaluation-authority.test.mjs

📝 Walkthrough

Walkthrough

Agent Runtime의 절차적 평가 증거가 결정적 거부 이력과 승인 적격성을 포함하도록 변경되었습니다. 서로 다른 선별 결과는 서로 다른 증거 다이제스트를 생성하며, 이전 거부 결과의 재사용을 거부합니다.

Changes

절차적 평가 증거 무결성

Layer / File(s) Summary
증거 계약 및 다이제스트 갱신
src/agent-runtime/procedural-evaluation-authority.ts
ProceduralEvaluationEvidencerejectionKeydecisionReason을 추가했습니다. 증거 다이제스트가 거부 키, 결정 사유, eligibleForApproval을 해시하도록 변경했습니다. 승인된 증거에 결정 정보를 보존합니다.
거부 이력 검증 테스트
test/procedural-evaluation-authority.test.mjs, CHANGELOG.md
테스트 헬퍼가 거부 키를 전달합니다. 이전 거부 후보의 previously_rejected 사유, 비승인 상태, 다른 다이제스트, 입증 거부를 검증합니다. 변경 내용을 changelog에 기록했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/procedural-durable-history-20260910

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head review on exact 99f4505a1f93f90badc61c953dcaee2266a2ced5: the original authority ambiguity is causally repaired. The envelope now binds the deterministic rejection identity, screening disposition, and approval eligibility in addition to the already-bound graph/context/paired receipt identities; admitted evidence retains those fields while remaining activationAuthorized:false. The regression exercises the specific same-evidence/different-rejection-history case and cross-admission fails closed. CHANGELOG diff is now limited to the new #596 Unreleased entry; the unrelated historical undici wording drift introduced during documentation editing was repaired before this review. No additional valid source/test/DDD boundary finding observed in the three-file patch. This is COMMENT only, not self-approval; merge remains contingent on all current-head required gates and fresh thread/review state.

@seonghobae
seonghobae marked this pull request as ready for review September 10, 2026 12:20
@seonghobae
seonghobae merged commit cde9cfa into main Sep 10, 2026
17 of 18 checks passed
@seonghobae
seonghobae deleted the feat/procedural-durable-history-20260910 branch September 10, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant