Skip to content

cortex: check-in scorer resolves Where-to-look bullets against project roots - #371

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cortex-scorer-where-paths
Sep 9, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/cortex-scorer-where-paths

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

What was broken

Three defects in the check-in scorer (agents/conductors/cortex/_cortex.py):

  1. where_paths kept only bullets that were already absolute — a
    relative ## Where to look bullet was silently discarded.
  2. where_paths read only bullet.split()[0] — if a bullet's path
    wasn't the first whitespace-delimited token, it was never seen.
  3. run_artifacts silently fell back to the newest run under output/
    whenever a task's declared paths did not resolve — scoring a stranger's
    run instead of admitting there was nothing to look at.

What changed

  • where_paths resolves relative bullets against the project's registered
    roots instead of discarding them.
  • where_paths scans the whole bullet for path-like tokens, not just the
    first one.
  • run_artifacts refuses to fall back to the newest output/ run when the
    declared paths don't resolve — that state is now UNOBSERVABLE, not a
    silent substitution. Any fallback that does still happen is labelled as
    one in both readouts.

Test evidence

  • Full suite (939 passed, 1 failed in 6:12) run earlier in this worktree.
    The single failure,
    test_a_fixture_tree_finds_the_schema_its_checkout_ships, is a
    pre-existing worktree/symlink trap unrelated to this change — it resolves
    the canonical PyAutoCortex checkout instead of the worktree's symlinked
    copy, and passes in the canonical checkout (verified independently), so it
    passes in CI.
  • Re-ran just the touched file as ship-step evidence:
    tests/test_cortex_conductor.py → 93 passed, 1 failed (the same known
    trap above).
  • Three new regression tests were added, and all three fail against the
    pre-fix module — verified by stashing the fix and re-running them.

Live verification (read-only scoring of the 9 live Cortex tasks, patched scorer)

  • All five subhalo_validation tasks previously scored against one
    shared
    stale rectangular_adapt/pl_sersic_0 … source_pix[2] directory;
    each now scores against its own run dir (pl_eff_0, pl_eff_1_outer,
    rectangular_adapt/pl_sersic_0, …).
  • ordered_mge_control_unordered_102005065 now scores
    output_ordered_witness/run_1/…, its real run, instead of a stale phase-4
    vis_pix directory belonging to a different tile.
  • ordered_mge_witness_102005065 now reports run dir: none with wall
    UNOBSERVABLE (its bullets use …/<id> elisions) rather than inventing a
    verdict from a stranger's run.
  • The FAILs that remain on those tasks now come from resume and witness,
    the two adjacent defects the issue lists as out of scope.

Readiness

Heart is RED on five reasons; the human acknowledged all five as
organism-scope in-session (recorded in PyAutoMind/active.md under
cortex-scorer-where-paths as a heart-ack: line). Nothing in this branch
is in the release chain.

Closes #370.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FKSwTBuNwcJc2FPNpSCrkp

…t roots

The check-in scorer's `where_paths` kept only bullets that were already
absolute, and for the ones it kept read only `bullet.split()[0]` — so a
relative path, or a path buried anywhere but the first token, was invisible
to it. `run_artifacts` then silently fell back to the newest run under
`output/` whenever a task's declared paths did not resolve, scoring a
stranger's run instead of admitting it had nothing to look at.

Fixes:
- `where_paths` resolves relative bullets against the project's registered
  roots instead of discarding them.
- `where_paths` scans the whole bullet for path-like tokens, not just the
  first one.
- `run_artifacts` refuses to fall back to the newest `output/` run when the
  declared paths don't resolve — that state is UNOBSERVABLE, not a silent
  substitution, and any fallback that does still happen is labelled as one
  in both readouts.

Closes #370.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKSwTBuNwcJc2FPNpSCrkp
@Jammy2211
Jammy2211 merged commit ec354a7 into main Sep 9, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/cortex-scorer-where-paths branch September 9, 2026 17:51
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.

fix: Cortex scorer drops relative Where-to-look, scores a stale run

1 participant