Repository navigation
fix(explore): bind measurements to the declared execution result #7764
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
shangzh0
wants to merge
2
commits into
loopx-project:main
Choose a base branch
from
shangzh0:codex/explore-measurement-corrections-20261101
base: main
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.
+265
−14
Open
Changes from all commits
Commits
Show all changes
2 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
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
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
3 changes: 3 additions & 0 deletions
3
tests/control_plane/fixtures/explore_measurement_history_v0.jsonl
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,3 @@ | ||
| {"boundary": {"absolute_paths_recorded": false, "credential_values_recorded": false, "raw_logs_recorded": false, "raw_session_transcript_recorded": false, "raw_task_text_recorded": false, "raw_trajectory_recorded": false}, "event_id": "cae05d192b3df6b2", "event_kind": "node", "goal_id": "research", "node_kind": "question", "recorded_at": "2026-01-01T00:00:00Z", "result_id": "question-a", "schema_version": "loopx_explore_result_event_v0", "status": "open", "title": "Which candidate improved?"} | ||
| {"boundary": {"absolute_paths_recorded": false, "credential_values_recorded": false, "raw_logs_recorded": false, "raw_session_transcript_recorded": false, "raw_task_text_recorded": false, "raw_trajectory_recorded": false}, "event_id": "5bd7df96eed54e81", "event_kind": "finding", "evidence_refs": ["result:a", "result:b"], "execution_observation": {"candidate_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "change_reason": null, "elapsed_seconds": 1, "evidence_refs": ["result:a", "result:b"], "executed_method_id": "probe", "input_revision": "dataset-v1", "limit_seconds": 10, "planned_method_id": "probe", "result_candidate_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "result_ref": "result:a", "schema_version": "explore_execution_observation_v0", "search_iterations": null, "stop_reason": "process_exit:0"}, "goal_id": "research", "measurements": [{"candidate_ref": "candidate:a", "comparison_scope": "validation:budget-v1", "evaluation_ref": "evaluator:v1", "evidence_ref": "result:b", "higher_is_better": true, "input_revision": "dataset-v1", "metric": "quality", "unit": "points", "value": 8}], "node_id": "question-a", "recorded_at": "2026-01-01T01:00:00Z", "result_id": "measured", "schema_version": "loopx_explore_result_event_v0", "status": "confirmed", "title": "Measured candidate"} | ||
| {"boundary": {"absolute_paths_recorded": false, "credential_values_recorded": false, "raw_logs_recorded": false, "raw_session_transcript_recorded": false, "raw_task_text_recorded": false, "raw_trajectory_recorded": false}, "event_id": "56e6425cc30feee1", "event_kind": "finding", "evidence_refs": ["result:a", "result:b"], "execution_observation": {"candidate_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "change_reason": null, "elapsed_seconds": 1, "evidence_refs": ["result:a", "result:b"], "executed_method_id": "probe", "input_revision": "dataset-v1", "limit_seconds": 10, "planned_method_id": "probe", "result_candidate_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "result_ref": "result:a", "schema_version": "explore_execution_observation_v0", "search_iterations": null, "stop_reason": "process_exit:0"}, "goal_id": "research", "measurements": [{"candidate_ref": "candidate:a", "comparison_scope": "validation:budget-v1", "evaluation_ref": "evaluator:v1", "evidence_ref": "result:a", "higher_is_better": true, "input_revision": "dataset-v1", "metric": "quality", "unit": "points", "value": 8}], "node_id": "question-a", "recorded_at": "2026-01-01T02:00:00Z", "result_id": "measured", "schema_version": "loopx_explore_result_event_v0", "status": "confirmed", "title": "Measured candidate"} |
Oops, something went wrong.
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] Keep the historical reader usable after tightening finding writes
这里的新跨字段校验也会在validate_explore_result_event重建旧finding时运行。基线真实writer允许保存execution.result_ref=A、measurement.evidence_ref=B且两者均列入evidence_refs的记录;升级后load_explore_result_events_strict和公开history适配器会在这条旧行抛错,整份Goal日志不可读。即便该finding已有一个匹配A的更正版,或在head成功追加正确更正版,strict reader仍先拒绝旧行,无法到达当前版本折叠。独立固定base/head探针确认:基线3行完整读取成功;head同一sha256日志在第2行拒绝;head追加更正后4行仍相同失败。请保留新写入拒绝,同时提供可审计、可纠正的历史兼容/隔离路径,避免要求删改append-only原证据。
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.
Fixed in c053027 after reproducing the P2. Structural history reads preserve the base-writer records; ordinary single/batch writes recheck cross-attribution. Contradictory current quantities expose measurement_error and do not enter comparison. Corrected history, another correction append, forged-identity rejection and byte-identical ordered archival replay are covered. The synthetic base-writer fixture and regression are included. Validation: 119 Python passed / 2 existing optional skips; 59 TypeScript passed; standard canary and isolated installed-wheel paths passed. The PR description now names this exact head and retains the initial review finding. Re-review is pending; no merge performed.