-
Notifications
You must be signed in to change notification settings - Fork 0
Add a holdout-safe Fit experience index #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
divo12
wants to merge
3
commits into
codex/hermes-agent-diagnoser
Choose a base branch
from
codex/fit-experience-index
base: codex/hermes-agent-diagnoser
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Fit experience index | ||
|
|
||
| Each completed `FitCampaign` writes one content-bound `experience.json` beside its result manifest. The index is the provider-neutral observation surface for the next candidate proposer. It does not choose edits or summarize away source evidence. | ||
|
|
||
| ## Developer-visible evidence | ||
|
|
||
| For every attempted candidate, the index preserves: | ||
|
|
||
| - the frozen candidate manifest and prediction attribution; | ||
| - final candidate status and gate reason; | ||
| - the candidate diff artifact reference; | ||
| - content-digested references to the raw champion and candidate developer benchmark results; | ||
| - each developer case’s cluster family, source trace, trace family, snapshot reference, and partition; and | ||
| - every paired champion/candidate run result, verifier verdict, score, textual feedback, metric, evidence reference, and case delta. | ||
|
|
||
| Textual verifier feedback is stored unchanged. The compact index is navigational: the raw developer snapshot, benchmark results, and candidate diff remain available for drill-down. | ||
|
|
||
| ## Holdout boundary | ||
|
|
||
| Selection and admission cases are evaluator-only. The proposer-visible index records only whether each stage ran, its completion status, and whether its frozen threshold passed. It never stores holdout case IDs, trace IDs, family IDs, snapshot references, prompts, outputs, verifier feedback, or raw benchmark paths. | ||
|
|
||
| This asymmetry is intentional. Developer evidence teaches the next proposer; holdouts decide whether a frozen candidate survives. Returning holdout diagnostics would turn repeated selection into training and invalidate the gate. | ||
|
|
||
| ## Integrity | ||
|
|
||
| `FitResult.experience_digest` binds the exact index bytes. `read_fit_experience(result)` validates campaign, export bundle, input digest, harness revision, candidate ordering, statuses, gate reasons, prediction attribution, developer-result linkage, and every referenced developer artifact digest. Cached `FitCampaign.run()` additionally rebuilds the developer case index from the raw champion/candidate benchmark artifacts and export cases before returning a prior result. | ||
|
|
||
| Tampering with the index, candidate diff, or raw developer benchmark result therefore fails with `FitErrorCode.RESULT_INVALID`. Existing candidate/revision validation remains authoritative for the harness, export snapshots, and candidate manifest. | ||
|
|
||
| ## Why this is the minimum useful shape | ||
|
|
||
| A scalar leaderboard cannot tell an optimizer which tool, prompt, skill, subagent, or middleware behavior caused a failure. Copying all artifacts into a second store adds drift without adding evidence. The index instead supplies AHE-style component and decision observability while retaining Meta-Harness-style drill-down to raw developer traces. A filesystem manifest and exact identifiers are sufficient for local v0; no vector database, summarizer, or provider-specific proposer belongs in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: When a repository already contains a baseline or Fit manifest from before this change, cached reads reject its attempts because
source_case_idis missing, and legacy baseline verification reports semantic drift after the field is added to_semantic. Add backward-compatible deserialization and preserve the legacy digest for old artifacts, or explicitly version and migrate/invalidate these persisted results.Prompt for AI agents