Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .agents/pm/features/pm-rl-shadow.toon
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
id: pm-rl-shadow
title: Observe candidate policies safely before deployment
description: "Controlled online shadow observation on explicitly consented inputs, with paired resource accounting and validated outcome receipts required by the existing promotion boundary."
type: Feature
status: in_progress
priority: 1
tags: []
created_at: "2026-10-23T06:41:11.687Z"
updated_at: "2026-10-23T08:22:07.469Z"
author: codex-agent
acceptance_criteria: Candidate failures never affect active actions; Budgets include both arms; Switching requires a validated outcome comparison through existing promotion and RSI code
parent: pm-rl-apvf
comments[9]{created_at,author,text}:
"2026-10-23T06:41:26.255Z",codex-agent,"Overlap checked against the pinned pm SDK and current CLI 2026.10.23, pm-context, pm-jev, and existing pm-rl evaluation, loop, meta proposer and promotion modules. Core owns tracker/history/transactions; pm-context supplies bounded context; pm-jev replays typed decisions. Existing RL loops evaluate/train/promote offline. This feature adds explicitly consented online observation with no candidate mutation authority and reuses predeclared evaluation plans plus the authoritative promotion transaction. Draft PRs 95 and 98 are context only. No dependency bump is needed unless SDK capability inspection proves otherwise."
"2026-10-23T06:56:27.540Z",codex-agent,"Implemented a bounded declarative shadow interpreter with no executable candidate tools or tracker authority. Consent pins both generation identities, both policy digests, exact minimized input hashes and separate active/candidate allowances; every frozen member reserves two calls including candidate failures. Immutable per-member SDK receipts make retries free and outcome replacement a refusal. Existing evaluation plans and the authoritative promotion transaction require the comparison receipt for online candidates; standalone offline evaluation cannot bypass it. Local linked parser test passes 1/1. Source and packed acceptance use non-git trackers; full release gates will run in CI."
"2026-10-23T07:02:21.061Z",codex-agent,"Behavioral revert proof: independently omitting enforceShadowComparison from the existing evaluation gate fails the retry-safe receipt regression (1/1); propagating a missing candidate decision fails active-isolation (1/1); disabling the two-arm allowance validator fails strict-parser regression (1/1). Restored code passed the preceding complete 7/7 shadow suite including actual generation promotion without git. Final consent-generation binding and additional corruption/concurrency regressions are now under targeted validation. The SDK/dev pin remains 2026.10.17; there is no feature dependency on newer CLI behavior."
"2026-10-23T07:07:52.857Z",codex-agent,"Focused source validation passed 11/11 with shadow.ts at 100% lines, branches and functions. Added read-only promotion revalidation and a forged-original-receipt regression; final focused verification and packed replay are running. Public MIT pm-context snapshot: 84 certified items; first 20 sorted ids selected without outcome filtering; 17 closed and 3 other; 20/20 active decisions preserved; 20 disagreements; zero candidate failures; 20 active plus 20 candidate calls charged. All 175 copied source files retain identical digest and read-only permissions. One independent tracker unit correctly refuses promotion despite observed candidate accuracy 0.85 versus active 0.15. JSON observation 548 bytes; comparison JSON 1278 bytes and TOON 1127 bytes. This measures the observation/gating mechanism, not a learned policy improvement."
"2026-10-23T07:17:22.816Z",codex-agent,"Final focused source suite passed 12/12 at 100% shadow lines/branches/functions; packed public replay passed unchanged. Review then closed an online-lineage bypass: the existing promotion gate now requires shadow evidence even for an unreserved or offline-only successor of an online-bound incumbent, so the recursive proposer cannot escape by omitting the marker. New lineage regression passes 1/1; reverting only the unreserved-lineage enforcement fails 1/1. Legacy lineages never bound online retain their offline contracts. The complete inherited-gate source suite is running; CI release gates are also running at https://github.com/unbraind/pm-rl/actions/runs/39915892410 and will be refreshed for the final head."
"2026-10-23T07:20:47.390Z",codex-agent,"Final implementation validation: node --test --experimental-test-coverage --test-coverage-include=shadow.ts test/shadow.test.ts passes 13/13, zero failures/skips/cancellations/todos, and 100% shadow lines/branches/functions. Typecheck, test typecheck, lint, zero duplication and documented declarations pass. Four independent behavioral reverts fail their intended regressions: receipt prerequisite, candidate-failure isolation, budget validation, and inherited online-lineage enforcement. Packed public validation is read-only, Git-free and reproducible with unchanged aggregate receipts. Review-ready PR https://github.com/unbraind/pm-rl/pull/99 owns the final-head npm/Bun release run URLs and exact counts; full release gates are intentionally delegated to CI on the saturated host. Scope limit: bounded declarative policy tables and valid paired outcomes; one public tracker is not an independent policy-quality win. Automated reviewer skips/unavailable access are not approval. Implementation work is complete; item stays in progress for orchestrator verification."
"2026-10-23T07:56:56.267Z",codex-agent,"Reopened for PR 99 blocking review. Confirmed two root gaps in the previous head: semantically inconsistent original receipts could pass hash/history checks, and reloaded manifests bypassed cohort and both-arm allowance checks. Fix will use shared manifest and receipt validators for observation, resume, comparison and the authoritative promotion gate. Validation will bind actions to consented input/policy tables, enforce finite bounded and same-action-consistent rewards, verify disagreement/failure/digest fields, and check actual unique receipt charges against both allowances. Four requested adversarial regressions and independent behavioral revert proofs will be recorded; no review-thread replies or mentions."
"2026-10-23T08:16:19.060Z",codex-agent,"Both blocking review findings are fixed through shared validators. validateDeployment now governs registration and every manifest reload: generation pair, exact plan cohort, consent, both reserved allowances and actual receipt inventory charges; extra slots cannot hide outside report counts. validateObservation now governs live observation, retry/resume, comparison and promotion reads: policy-produced actions for the consented input, bounded rewards, same-action reward equality, disagreement/failure flags and selected-outcome digest. Refusals use pinned SDK context.item_id and context.field and include both in the message. Focused suite passes 25/25 with 100% shadow lines/branches/functions. Four independent behavioral reverts each fail 1/1 with Missing expected rejection: identical-action rewards, zero-budget original manifest, tampered disagreement, and cohort expansion after plan registration; validators restored. Broader original-record tests also cover wrong actions, bounds, digests, slot IDs, unexpected charged receipts, both aggregate charges, edited manifests and native SDK workflow-policy refusal. No SDK mocks, history rewriting, dependency bumps, review-thread replies or mentions."
"2026-10-23T08:22:04.807Z",codex-agent,"Final follow-up verification: node --test --experimental-test-coverage --test-coverage-include=shadow.ts test/shadow.test.ts passes 25/25 with 100% lines/branches/functions for shadow.ts. Restored four requested regressions pass 4/4 with Git absent from PATH and an explicit discovery ceiling. Independent revert commands use node --test --test-name-pattern with the exact prefixes review regression: identical actions; review regression: a consented original zero-budget; review regression: an original tampered disagreement; review regression: a manifest cohort grown. Reverting only validateObservation to accept stored rows fails the reward and disagreement cases 1/1 each; reverting only validateDeployment to retain consent without cohort/budget checks fails the budget and expanded-cohort cases 1/1 each, all with Missing expected rejection. Source restored. Pinned linked-test execution passes 1/1; typecheck, test typecheck, lint, zero duplication and docstrings pass. Repacked public acceptance on the existing read-only source copy reproduces docs/shadow-evidence.json byte-for-byte. PR https://github.com/unbraind/pm-rl/pull/99 will carry the exact pushed-head npm/Bun CI run and counts; previous-head gates are historical only. Claim released for orchestrator verification; item remains in progress."
files[5]{path,scope}:
evaluation-plan.ts,project
index.ts,project
shadow.ts,project
test/shadow.acceptance.ts,project
test/shadow.test.ts,project
tests[1]{command,scope,provenance{author,created_at,source_kind,source_ref}}:
"node --test --test-name-pattern=\"strict parsers\" test/shadow.test.ts",project,codex-agent,"2026-10-23T06:53:44.350Z",local_mutation,feat/shadow-policy-deployment
docs[4]{path,scope}:
docs/shadow-evidence.json,project
docs/shadow-policy.md,project
examples/shadow-policy.json,project
README.md,project
body: ""
Loading
Loading