Repository navigation
feat: add bounded offline trace-guidance replay - #29
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
jmborden1112-beep
left a comment
There was a problem hiding this comment.
LGTM
Needs Fixing
None found at 9528069. Reviewed the bounded synthetic TraceSession implementation, archive verification, adversarial tests, example and docs. Canonical digest and encoding checks reject bool/int/float substitutions and rehashed authority changes. Replay stays opt-in, fixture-only, non-promoting, and provider-free.
Requires Human Review
No additional human-review finding for this source scope. This is an automated Codex review submitted through the solo maintainer's explicitly authorized second account; it is not independent human sign-off. The owner authorized this review and normal protected merge.
Recommended Optional
Live effectiveness, durable global quotas, process isolation and authenticated observations remain unqualified and separate. The fixtures make no production-benefit claim.
Create Follow-up Issue
None created; existing broader milestones remain separate.
Workflow Trace
Multi-agent Fable deep review: root source/diff synthesis plus read-only metan_architecture review, inherited session settings. Direct repository reads. Independent focused rerun: 35/35 tests. Exact-head hosted CI: all eight checks green across Node 18/24 on Ubuntu/macOS/Windows, packed artifact and release gate. Only validation runs on main; no publish/deploy workflow exists. No software installation, live provider call or runtime activation was performed by this review.
Problem and behavior
Fable's existing RRSI experiment freezes a corpus and grades structured results, but has no bounded path from development failure traces to declarative guidance and a versioned candidate/evidence archive. This adds that offline path beside the existing evaluator; it does not add another service, run an optimizer, or establish better model performance.
A default-off
TraceSessionaccepts only explicit synthetic fixture replay. Development failure codes select the existing finite host-owned guidance vocabulary, with at most two layers. The baseline, snapshot, evaluator/source/vocabulary, task split and per-arm budgets are bound before proposals. Held-out admission fixes the selected policy, seals further proposals and charges a cumulative attempt cap.Replay recomputes factual grades and distinguishes unchanged baseline-first, flat final retry, flat best-of-N oracle and one fixed policy. It counts all attempts, records regressions and safety failures, and separates actual offline latency/zero provider usage from fixture token/cost estimates. Canonical in-memory archive records are immutable copies with a hash chain; exports require a separately retained tip for verification.
Scope
Five files: new
trace_guidance.py, 35 behavioral tests, a runnable synthetic example, the existing test wrapper and RRSI README. The historical comparison example, evaluator, source verification and installed/default workflows are unchanged.Inspired by the bounded trace/archive and comparison ideas in Meta^n and the reference repository at b708184. This is a clean implementation; no upstream code, paper text or figures are copied, and their benchmark results are not claimed as ours.
Validation
Head:
95280698faed6c29555325815ce860eda7527695; base:0e6a42d33f894e593d7345dc9607d0432c931ada.node --test test/rrsi.test.mjson preceding implementation commitc381e724: 5/5 subtests passed, zero failures/skips (30 source tests, 28 existing evaluator tests, 32 initial guidance tests, and both offline examples).false/0and1/truearchive substitutions without changing the stored digest/tip. All three reported substitutions were reproduced on the prior head. The fix recomputes each received record digest and compares canonical encodings to the expected envelope. Three behavioral regression methods cover stale tips, attacker-rehashed mistyped envelopes, nested numeric type changes, and valid JSON whitespace/key ordering. All reported substitutions now reject. The original green CI does not establish correctness of this correction.git diff --check: passed.scripts/validate-package.ps1could not pass: the isolated sparse workspace deliberately excludes rootpackage.jsonandAGENTS.mdto preserve prior denied-copy boundaries. Both remain unchanged in Git. No substitute manifest, bypass or local installation was used.Evidence and authority limits
No executable generated hooks, shell/model/provider calls, runtime activation, installation, release, deployment, spend or promotion. The input and archive bounds, cancellation, frozen grading, split leakage, attempt accounting, oracle distinction, source drift and tamper refusal are behaviorally tested.
These are caller-supplied public synthetic fixtures, not authenticated live observations or a secret representative held-out benchmark. A higher fixture score is not evidence of real efficacy. Archive durability, authenticated ingestion, OS isolation and global cross-session accounting remain separate work. Source hashes are bindings, not approval. Every record is
synthetic_unverified,accepted: false,promotion_allowed: false, with authority effects false.The owner has since requested merging completed work that is ready. This source-only change is ready for the configured independent review; it remains unmerged until that approval and current required gates are satisfied. No runtime activation, installation or release is authorized by this source merge request.
Workflow trace: real multi-agent architecture/implementation assistance plus a separate source reviewer; coordinator adversarial review and final verification. Inherited session model settings, no model override. No paid evaluation or new runtime process is qualified.