You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 84bcba7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(python): the manifest key mixed a resolved anchor with an unresolved path
Found by an independent review of this session's own work, and it is a
regression this session introduced.
`project_root` arrives resolved (`project_root_for` calls `.resolve()`) while
the emitted path is built from the raw `out_dir`. `os.path.relpath` between a
resolved anchor and an unresolved path is not the path between the two
directories: under a directory symlink it walks OUT of the project, so every
key read `../link/gen/X.py`. `_is_ours_for` then matched none of them and
`verify --codegen` printed `in sync (0 file(s))` over 68 genuinely stale files
— through both the symlink path and the real one.
The spelling this replaced was immune BY ACCIDENT: `relpath(full, out_dir)`
took both sides from one unresolved string, so it was symmetric. Symmetry is
the property; both sides are now resolved deliberately, and the three reader
sites share one `_out_prefix` helper rather than spelling the translation three
times — three spellings of one translation is how they came to disagree.
`/tmp` is a symlink on macOS, so any project under it reproduces this directly.
Two of the three reader rungs were gated by nothing. The review reverted
`out_prefix` at the neutral-fallback rung and at the multi-target config rung
and the whole Python codegen suite still passed — 518/518. The pre-existing
case that looks like it covers the config rung seeds a LEGACY bare key, so it
is answered by the transitional fallback and can never see the new
translation. Both rungs now have the case the flag-mode rung had, each
confirmed red with its own prefix removed, plus the symlink case above.
Also corrected: the C# HashManifest comment still said "C# and Python key
relative to their single out dir" — two ports' comments contradicting each
other about Python — and repeated the advice to point each out dir at its own
gen-state dir, which is not followable because that directory is derived from
the project rather than configured. C# has the same latent ambiguity; closing
it is the same re-key plus fallback, and is not done here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTcEKXTQMYt84fAjuw5A2M
0 commit comments