Skip to content

feat: add bounded offline trace-guidance replay - #29

Merged
rhein1 merged 2 commits into
mainfrom
codex/declarative-trace-eval-20261024
Oct 24, 2026
Merged

rhein1 merged 2 commits into
mainfrom
codex/declarative-trace-eval-20261024

Conversation

@rhein1

@rhein1 rhein1 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

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 TraceSession accepts 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.

  • Local node --test test/rrsi.test.mjs on preceding implementation commit c381e724: 5/5 subtests passed, zero failures/skips (30 source tests, 28 existing evaluator tests, 32 initial guidance tests, and both offline examples).
  • Current-head focused guidance suite: 35/35 passed, zero failures/skips; enabled/held-out fixture demo passed. Independent reviewer reran all 35 and found no remaining actionable issue in the archive correction. This is agent review, not independent human sign-off.
  • Follow-up adversarial review found that Python dictionary equality accepted false/0 and 1/true archive 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.
  • Prior independent source review also found and cleared source/vocabulary drift and disabled-session API issues.
  • Python syntax and git diff --check: passed.
  • Local scripts/validate-package.ps1 could not pass: the isolated sparse workspace deliberately excludes root package.json and AGENTS.md to preserve prior denied-copy boundaries. Both remain unchanged in Git. No substitute manifest, bypass or local installation was used.
  • Exact-head hosted CI run 40113519161 completed successfully: 8 passed, 0 failed, 0 skipped, 0 pending. It includes Node 18/24 validation on Linux, macOS and Windows, packed-artifact validation, and the aggregate release gate. This validation gate does not publish a release.

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.

@rhein1
rhein1 marked this pull request as ready for review October 24, 2026 18:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T18:58:58.979795Z 9528069 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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 jmborden1112-beep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@rhein1
rhein1 merged commit 29b43a6 into main Oct 24, 2026
8 checks passed
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.

2 participants