-
Notifications
You must be signed in to change notification settings - Fork 1
self-improve-checkpoint-resume: resume openevolve MAP-Elites population across ~6h cycles #1006
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
196ee28
spec: self-improve-checkpoint-resume Phase 1a/1b (behavioral-spec + v…
Daisuke134 6a27a44
spec: resolve spec-review iteration-1 FIND-001..004 (self-improve-che…
Daisuke134 d81c52b
spec: resolve spec-review iteration-2 FIND-001/FIND-002 (self-improve…
Daisuke134 8da70c3
spec: self-improve-checkpoint-resume iteration-3 fixes (REQ-CR12 cras…
Daisuke134 5b81a32
spec: self-improve-checkpoint-resume iteration-4 fixes (file-vs-dir c…
Daisuke134 49fb55b
vcsdd(self-improve-checkpoint-resume): spec-review PASS iteration 5 (…
Daisuke134 515eb08
vcsdd(self-improve-checkpoint-resume): RED+GREEN phase 2a/2b — checkp…
Daisuke134 0288d3e
vcsdd(self-improve-checkpoint-resume): phase 2a -> 3, RED+GREEN evide…
Daisuke134 eba2270
vcsdd(self-improve-checkpoint-resume): fix FIND-001/FIND-002 from Pha…
Daisuke134 d499032
vcsdd(self-improve-checkpoint-resume): Phase 5 formal hardening compl…
Daisuke134 32794d1
vcsdd(self-improve-checkpoint-resume): Phase 6 CONVERGED, phase -> co…
Daisuke134 7a7081a
Merge remote-tracking branch 'origin/main' into feature/self-improve-…
Daisuke134 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| franklin-alwaysact-skill-router | ||
| self-improve-checkpoint-resume |
582 changes: 582 additions & 0 deletions
582
.vcsdd/features/self-improve-checkpoint-resume/evidence/green-phase.md
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
.vcsdd/features/self-improve-checkpoint-resume/evidence/red-phase.md
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,6 @@ | ||
| new-feature-tests: FAIL (pre-implementation, confirmed via git stash of run_evolve.sh + lib/checkpoint_resume.py) | ||
| regression-baseline: PASS | ||
|
|
||
| === RED (stashed impl, tests only) === | ||
| 1 collection error (ImportError: cannot import name checkpoint_resume) blocking test_checkpoint_resume.py's 23 tests | ||
| test_checkpoint_resume_wiring.py: 7 failed, 1 passed (PROP-CR-WIRE1/2/2b/3x2/13/LIVE1 all failed as expected pre-wiring) |
96 changes: 96 additions & 0 deletions
96
.vcsdd/features/self-improve-checkpoint-resume/reviews/converge/output/verdict.json
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,96 @@ | ||
| { | ||
| "phase": "converge", | ||
| "feature": "self-improve-checkpoint-resume", | ||
| "verdict": "CONVERGED", | ||
| "iteration": 1, | ||
| "reviewerToolConstraints": "This convergence session had NO Bash/execute tool available (only Read/Write/Edit/Grep/Glob). I could not run `python3 -m pytest`, `semgrep`, `bash -n`, or `git diff`/`git log -p` myself. Per the task's own instructed fallback, I cross-referenced verification-report.md's '31/31 pass' and 'full suite 18 failed/102 passed/1 skipped' claims against the on-disk `.pytest_cache/v/cache/{lastfailed,nodeids}` artifacts (still present in this worktree) and against a byte-for-byte count of `def test_` occurrences in both actual test files, rather than re-executing pytest.", | ||
| "dimensions": [ | ||
| { | ||
| "name": "spec_fidelity", | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": [ | ||
| {"type": "file", "location": "skills/earn/self-improve/lib/checkpoint_resume.py:15-69", "description": "Direct read this session: find_latest_checkpoint's absolute-path normalization (REQ-CR1, line 52 os.path.abspath), filter->exclude->sort-descending->iterate order (REQ-CR2, lines 56-67), REQ-CR10 run-name regex `^run-\\d{8}T\\d{6}Z$` (line 19), integer (not lexicographic) checkpoint comparison via int(match.group(1)) (REQ-CR3, lines 38-41), os.path.isdir guard before listdir (EDGE-CR12, line 29) all match behavioral-spec.md's literal requirement text."}, | ||
| {"type": "file", "location": "skills/earn/self-improve/run_evolve.sh:75-85,103-110", "description": "REQ-CR6's pinned call string `RUNS_DIR=\"$RUNS_DIR\" RUN_ID=\"$RUN_ID\" \"$PY_BIN\" \"$SKILL_DIR/lib/checkpoint_resume.py\"` is present verbatim at line 75, positioned after $RUN_DIR creation (line 52) and before the first `\"$OPENEVOLVE_BIN\"` occurrence (line 87). All three REQ-CR9 pinned log substrings ('checkpoint_resume: resuming from checkpoint', 'checkpoint_resume: no prior checkpoint found', 'checkpoint_resume: resume-check crashed') are present verbatim in their correct branch (lines 79/81/84). The FIND-001 fix idiom `\"${CHECKPOINT_ARGS[@]+\"${CHECKPOINT_ARGS[@]}\"}\"` is present at line 109, exactly as both impl-review verdicts describe -- independently re-confirmed by direct read this session, not merely trusted from the narrative."}, | ||
| {"type": "file", "location": "skills/earn/self-improve/config.yaml:11,129", "description": "behavioral-spec.md's sources section cites `checkpoint_interval: 10` at config.yaml line 11 and `database.db_path: \"runs/db\"` at config.yaml line 129 (EDGE-CR10). Both independently re-read this session and confirmed byte-accurate: line 11 is exactly `checkpoint_interval: 10 # top-level Config field...` and line 129 is exactly `db_path: \"runs/db\"`."} | ||
| ] | ||
| }, | ||
| { | ||
| "name": "edge_case_coverage", | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": [ | ||
| {"type": "file", "location": "skills/earn/self-improve/tests/test_checkpoint_resume.py:1-418", "description": "Counted 23 `def test_` functions in this file this session, matching verification-report.md's PROP-CR1/1b/2/3/4/5(x2)/6/7/8(x2)/9/10(x2)/11/12a/12b/12c(x2)/14(x2) plus the residual REQ-CR4 test -- every EDGE-CR1 through EDGE-CR12 case has a dedicated tmp_path fixture (EDGE-CR11's stray-.DS_Store-only checkpoints/ dir at lines 274-280, EDGE-CR12's zero-byte plain-file-named-like-a-run-dir at lines 293-303, both hand-verified this session)."}, | ||
| {"type": "file", "location": "skills/earn/self-improve/tests/test_checkpoint_resume_wiring.py:1-343", "description": "Counted 8 `def test_` functions in this file this session (wire1/wire2/wire2b/wire3x2/cr13/live1/regression-syntax) = 23+8=31 total, matching every one of the 31 test node IDs actually present in `.pytest_cache/v/cache/nodeids` (grep-confirmed this session: exactly 31 `checkpoint_resume` occurrences, each an exact match to a real `def test_` name in these two files -- no phantom test name in either document)."} | ||
| ] | ||
| }, | ||
| { | ||
| "name": "implementation_correctness", | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": [ | ||
| {"type": "file", "location": "skills/earn/self-improve/run_evolve.sh:75-113", "description": "Full pre-invocation step hand-traced this session against REQ-CR6/7/8/9/12: exit-status capture (line 76) precedes CHECKPOINT_ARGS initialization (line 77); if/elif/else (78-85) prioritizes the crash branch before found/not-found; the fixed array-expansion at line 109 (the FIND-001 fix) is present verbatim, matching what both impl-review verdicts describe as the reviewed state -- this session's direct read of the CURRENT worktree file (HEAD=d4990326, not a stale copy) shows no drift from what iteration-2's verdict (reviewed_commit eba2270a) described, since Phase 5's only subsequent commit (d4990326, 'Phase 5 formal hardening complete') is stated in state.json's own phaseHistory to have added only verification/*.md files, and this session's direct read of checkpoint_resume.py/run_evolve.sh/both test files independently confirms their content is unchanged from what iteration-2 reviewed."}, | ||
| {"type": "test-output", "location": "skills/earn/self-improve/.pytest_cache/v/cache/lastfailed", "description": "Read this session: exactly 18 entries, every one in a pre-existing, unrelated test file (test_adversary_disapprove.py, test_baseline_beat.py, test_denylist_reject.py, test_heldout_regress.py, test_ledger_reader.py, test_realized_gate.py, test_risk_adjusted_fitness.py) -- ZERO entries from test_checkpoint_resume.py or test_checkpoint_resume_wiring.py, corroborating (independently of the narrative) verification-report.md's '31/31 pass, 18 pre-existing unrelated failures' claim. This cache file is a durable, still-present artifact (unlike the specific .pyc bytecode files iteration-2's verdict also cited -- see structural_integrity finding below for that caveat)."} | ||
| ] | ||
| }, | ||
| { | ||
| "name": "structural_integrity", | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": [ | ||
| {"type": "file", "location": "skills/earn/self-improve/{config.yaml,promote_gate.sh,lib/promote.py,lib/promote_gate.py,strategies/pm_backtest_strategy.py,launchd/ai.anicca.self-improve-evolve.plist}", "description": "Fresh Grep this session for the literal string 'checkpoint_resume' across all six INV-CR2-protected files: ZERO matches in any of them -- independently confirms INV-CR2 ('this feature never touches' these files) holds against the actually-current worktree state, not merely against a prior session's grep."}, | ||
| {"type": "file", "location": "skills/earn/self-improve/lib/checkpoint_resume.py:15-17", "description": "Direct read confirms the module's ONLY imports are `import os`, `import re`, `import sys` -- no subprocess/socket/requests/urllib/shutil/pathlib -- matching PROP-CR9/PROP-CR12a/PROP-CR12b's claims independently, not merely re-stating purity-audit.md's own self-report."} | ||
| ] | ||
| }, | ||
| { | ||
| "name": "verification_readiness", | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": [ | ||
| {"type": "file", "location": "skills/earn/self-improve/tests/test_checkpoint_resume_wiring.py:166-186", "description": "Direct read confirms FIND-002's fix is real and present: `test_prop_cr_wire2_no_checkpoint_found_argument_list_unchanged_and_logged` asserts `len(capture_lines) == 8` and `\"\" not in capture_lines`, not merely substring absence of '--checkpoint' -- genuinely capable of catching a regression of FIND-001's empty-array-expansion bug, independently re-verified this session against the actual test source, not the verdict's own description of it."}, | ||
| {"type": "file", "location": ".vcsdd/features/self-improve-checkpoint-resume/verification/verification-architecture.md:60-79 vs verification-report.md:8-29", "description": "Every one of the 19 PROP-CR* rows in verification-architecture.md's Proof Obligations table has a corresponding 'PROVED' row in verification-report.md citing a real, exact test function name -- cross-checked this session against the actual test file contents (both files read in full) and against `.pytest_cache/v/cache/nodeids`: every cited test name exists verbatim in the real test files and was collected by a real pytest run. No PROP references a test name that does not exist."} | ||
| ] | ||
| } | ||
| ], | ||
| "criteria": { | ||
| "finding_diminishment": { | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": "Phase 3 impl-review: 2 blocking findings (iteration 1) -> 0 blocking findings (iteration 2), both independently re-confirmed resolved this session by direct code read (run_evolve.sh:109's fixed array idiom; test_checkpoint_resume_wiring.py:166-186's strengthened assertion). This is this feature's first Phase 6 convergence pass; there is no prior converge iteration to diminish against, but the Phase 3 trend itself (2->0) is genuine, not a renamed/deferred finding." | ||
| }, | ||
| "finding_specificity": { | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": "Both Phase 3 findings (FIND-001, FIND-002) carried exact file:line evidence and were independently re-derivable this session from the actual current file contents, not merely trusted from the fix narrative -- FIND-001's fix (run_evolve.sh:109) and FIND-002's fix (test_checkpoint_resume_wiring.py:166-186) were both located and read directly, not located via the verdict's own line-number claim alone (I independently re-read the surrounding lines to confirm the described content, not just that *a* line existed at that number)." | ||
| }, | ||
| "criteria_coverage": { | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": "No contracts/sprint-N.md exists for this feature (Glob of .vcsdd/features/self-improve-checkpoint-resume/{contracts,reviews/contracts}/** returns nothing) -- this feature used lean-mode spec-review + impl-review only, no strict CRIT-XXX contract phase. All 19 PROP-CR* proof obligations in verification-architecture.md are accounted for in verification-report.md's discharge table (cross-checked this session, see verification_readiness dimension)." | ||
| }, | ||
| "four_dimensional_convergence": { | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": "SPEC (behavioral-spec.md REQ-CR1-12/INV-CR1-5/EDGE-CR1-12, verification-architecture.md's 19 PROP-CR* rows), TEST (31/31 passing per .pytest_cache/nodeids cross-check against real test file contents), IMPL (lib/checkpoint_resume.py + run_evolve.sh's new step, directly re-read this session and matching every cited requirement), and VERIFICATION (verification-report.md/security-report.md/purity-audit.md, whose specific factual claims -- config.yaml:11/129 citations, import list, INV-CR2 file-touch scan, PROP discharge table -- were independently re-derived this session rather than rubber-stamped) are mutually consistent for this feature's entire surface." | ||
| }, | ||
| "duplicate_detection": { | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": "FIND-001 and FIND-002 (Phase 3 iteration 1) are genuinely resolved, not renamed or deferred: the fix at run_evolve.sh:109 is the exact idiom both impl-review iteration-2 and this session independently identify as the canonical portable fix, and the strengthened test at test_checkpoint_resume_wiring.py:166-186 is demonstrably capable (by its own asserted argument-count/empty-string checks) of catching a regression of the exact bug class FIND-001 was. No new instance of either bug class was found this session in either file." | ||
| }, | ||
| "residuals_honest": { | ||
| "verdict": "PASS", | ||
| "findings": [], | ||
| "evidence": "Two non-blocking residuals are disclosed here rather than swept into a blanket 'zero deviations' claim: (1) the specific `.pyc` bytecode artifacts iteration-2's impl-review verdict cited as 'independently-discovered... could not have been fabricated' forensic evidence (lib/__pycache__/checkpoint_resume.cpython-314.pyc, tests/__pycache__/test_checkpoint_resume_wiring.cpython-314-pytest-9.1.1.pyc) do NOT exist in this worktree as of this session (confirmed via Glob of skills/earn/self-improve/**/__pycache__/** -- zero matches); this is most plausibly explained by __pycache__ being gitignored (skills/earn/self-improve/.gitignore:3-4) and transient/cleaned since that review session, and the claim is NOT falsified by this absence because the more durable `.pytest_cache/v/cache/{lastfailed,nodeids}` artifacts DO still exist and DO independently corroborate the same underlying '31/31 pass, 18 unrelated pre-existing failures' claim (cross-checked this session against the real test file contents, not merely re-read as narrative) -- so the underlying factual claim survives even though one specific corroborating artifact it cited no longer does. (2) Phase 1c's own spec-review iteration-5 verdict (reviews/spec/iteration-5/output/verdict.json) lists only 2 of the usual 5 review dimensions (spec_fidelity, verification_readiness) rather than a full 5-dimension re-evaluation -- a process-completeness observation about an already-gated (PASS, 0 blocking) prior phase, outside this session's primary Phase 3/5-cross-check mandate, noted here rather than omitted. Neither residual is blocking: no code-level claim in verification-report.md/security-report.md/purity-audit.md that this session checked (config.yaml line citations, import list, INV-CR2 grep scan, PROP-to-test-name mapping, argument-count assertions) was found false." | ||
| } | ||
| }, | ||
| "blocking_count": 0, | ||
| "reviewed_commit": "d4990326 (current worktree HEAD; Phase 3's own reviewed_commit was eba2270a -- the two intervening commits, per state.json's phaseHistory, added only verification/*.md hardening docs, and this session's direct read of the actual current lib/checkpoint_resume.py, run_evolve.sh, and both test files confirms their content is unchanged from what iteration-2 reviewed)", | ||
| "convergenceSignals": { | ||
| "findingCount": 0, | ||
| "allCriteriaEvaluated": true, | ||
| "evaluatedCriteria": [], | ||
| "duplicateFindings": [] | ||
| }, | ||
| "ts": "2026-07-12T00:00:00.000Z" | ||
| } | ||
14 changes: 14 additions & 0 deletions
14
...res/self-improve-checkpoint-resume/reviews/impl/iteration-1/output/findings/FIND-001.json
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,14 @@ | ||
| { | ||
| "findingId": "FIND-001", | ||
| "dimension": "implementation_correctness", | ||
| "category": "requirement_mismatch", | ||
| "severity": "critical", | ||
| "blocking": true, | ||
| "description": "run_evolve.sh:109 appends the new checkpoint flag via `\"${CHECKPOINT_ARGS[@]:-}\"`. When no checkpoint is found (or the resume-check crashes), CHECKPOINT_ARGS stays the empty array declared at run_evolve.sh:77 (`CHECKPOINT_ARGS=()`). Under `set -u` (run_evolve.sh:26) on bash < 4.4 -- which is exactly the shell this script's own header comments (run_evolve.sh:17-25) say it targets, and which is macOS's stock, never-upgraded system `/bin/bash` (3.2, unchanged for licensing reasons) that a launchd-invoked script with a minimal PATH will resolve to -- expanding `${arr[@]}` on a declared-but-empty array is treated as 'unset' for nounset purposes (fixed only in bash 4.4's changelog item 'Expanding an empty array is no longer an error when nounset is enabled'). The `:-` operator's fallback, when triggered, substitutes its (empty) word literally as ONE quoted argument -- it does not re-apply `[@]` array-splitting to the fallback the way `${arr[@]+\"${arr[@]}\"}` (the canonical, fully-correct fix for this exact bash pitfall) does. The practical effect: in the 'no checkpoint found' branch (and the 'resume-check crashed' branch), `\"$OPENEVOLVE_BIN\" ... --output \"$RUN_DIR\" \"${CHECKPOINT_ARGS[@]:-}\"` likely passes ONE spurious trailing empty-string argument to openevolve-run, violating REQ-CR8/INV-CR4's explicit 'invoke openevolve-run with EXACTLY the same argument list it uses today ... byte-for-byte the pre-existing behavior'. Confirmed via direct read of the installed CLI's own arg parser (~/.anicca-venvs/self-improve/lib/python3.14/site-packages/openevolve/cli.py:22-26): openevolve-run's argparse defines EXACTLY two positional arguments (initial_program, evaluation_file) and no catch-all/nargs='*' positional -- a third stray positional token (even an empty string) is unrecognized and argparse raises 'error: unrecognized arguments' and calls sys.exit(2). Since the not-found branch is the MOST COMMON path (every first-ever run, and every run until a valid checkpoint accumulates -- which, if this bug fires, would never happen because every such cycle would crash openevolve-run immediately), this is a regression strictly worse than the tied-combined_score stagnation this feature was built to fix: instead of a wasted-but-completing cycle, every cycle in the fallback branch would fail outright. I could not execute a live `bash -c` repro or check this Mac's actual `/bin/bash --version` to settle this with 100% certainty -- this review session has no Bash/execute tool available, only Read/Grep/Glob/Write/Edit -- so this finding is reasoned from (a) documented bash nounset+empty-array semantics and the well-known `:-` vs `+` fallback distinction, (b) the directly-read openevolve argparse source, and (c) FIND-002's confirmation that no existing test actually checks full argument-list identity in this branch. Recommended fix: replace `\"${CHECKPOINT_ARGS[@]:-}\"` with `\"${CHECKPOINT_ARGS[@]+\"${CHECKPOINT_ARGS[@]}\"}\"`, or branch explicitly on `${#CHECKPOINT_ARGS[@]}` before invoking `$OPENEVOLVE_BIN`, then re-verify by actually running the composed command under this machine's real `/bin/bash` and inspecting the captured argv byte-for-byte.", | ||
| "evidence": { | ||
| "filePath": "skills/earn/self-improve/run_evolve.sh", | ||
| "lineRange": "77,103-110", | ||
| "snippet": "CHECKPOINT_ARGS=()\n...\n\"$OPENEVOLVE_BIN\" \\\n \"$SKILL_DIR/strategies/pm_backtest_strategy.py\" \\\n \"$SKILL_DIR/evaluator.py\" \\\n --config \"$SKILL_DIR/config.yaml\" \\\n --iterations \"$ITERATIONS\" \\\n --output \"$RUN_DIR\" \\\n \"${CHECKPOINT_ARGS[@]:-}\" \\\n >> \"$LOG\" 2>&1" | ||
| }, | ||
| "routeToPhase": "2b" | ||
| } |
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.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Correct the proof-obligation count.
verification-architecture.mdcontains 20PROP-*rows, not 19. Update this count so the convergence evidence remains auditable.🤖 Prompt for AI Agents