Skip to content

fix(tools): name a missing dependency and a dependency cycle in resolve.py errors (#1922) - #1955

Merged
braboj merged 3 commits into
mainfrom
fix/resolve-errors
Oct 17, 2026
Merged

braboj merged 3 commits into
mainfrom
fix/resolve-errors

Conversation

@braboj

@braboj braboj commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Closes #1922.

What

  • tools/resolve.py: a shared _resolve_order walker now backs both resolve_chain and resolve_ids. It raises ResolveError with one of three messages:
    • Missing dependency: <entry> depends on <id>, which has no manifest entry, or the core tier names <id>… when the missing ID comes from the core list
    • Dependency cycle: a -> b -> a
    • Unknown root: <id> has no manifest entry, for library callers. The CLI still checks the root itself first.
  • main() prints the message and exits 1 with no traceback. The old code dropped a missing ID and resolved a shorter chain at exit 0, and recursed on a cycle until RecursionError.
  • SYS-19 (new smoke check, with spec SAIT-SMK-SYS-19-001A and an INDEX row): it plants a manifest with a valid control root, a missing ID and a cycle, then runs the resolver's own main() against each one. It asserts the status, the phrase, and that no traceback appears.
  • CLAUDE.md §5.2 lists SYS-19. CHANGELOG has an Unreleased "Added" line (forks run resolve.py).

Behaviour unchanged on the real manifest

Every root from --roots plus both fixtures resolves to byte-identical output before and after: 39 roots, 586 lines. --roots output is identical too, and resolve.py --check passes.

Verification

  • run_smoke.py: 34/34. sync.py --check and audit_redundancy.py --check are clean. run_conformance.py: 0 failed. Its readings: release ordering has no other ready PR, no off-limits path is touched, and the test change is tests/run_smoke.py gaining SYS-19 (pure addition).
  • Control: SYS-19 against main's resolve.py (confirmed landed) fails. stack-missing exits 0, and stack-cycle exits 1 without the cycle phrase. Then reverted.

🤖 Generated with Claude Code

braboj and others added 3 commits October 17, 2026 13:36
…ve.py errors (#1922)

The resolver skipped an ID with no manifest entry and resolved a shorter
chain at exit 0, and recursed on a cycle until RecursionError. Both
chains now raise ResolveError naming what broke, and the CLI prints it
and exits 1. Every root resolves to the same chain as before. SYS-19
plants a manifest with each fault and a valid control root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The walker seeded the core tier as done, so a missing ID or a cycle under
a core entry exited 0 in every chain. The core tier's subgraph is now
checked on its own before the root's; output order is unchanged. SYS-19
gains a case for each: core -> missing, core -> core, core -> stack -> core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@braboj

braboj commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Review finding addressed in f4ea0f4 "check the core tier's own dependencies in resolve.py":

  • _resolve_order now runs _check_graph over the core tier's subgraph before it checks the root's tree. Seeding the core tier as done for ordering left the core entries' own depends_on unwalked. The output order is unchanged: the core tier first, in manifest order, then the root's chain.
  • SYS-19 plants one manifest per core-tier fault, since such a fault breaks every root. The three new cases are core → missing, core → core, and core → stack → core. Each now exits 1 with Missing dependency: base-a depends on base-nowhere, Dependency cycle: base-a -> base-a or Dependency cycle: base-a -> stack-valid -> base-a. That makes 6 cases in all.
  • Control: SYS-19 against the previous walker (confirmed landed) fails exactly those three cases, each at exit 0. Then reverted.
  • All 39 roots plus both fixtures still resolve to byte-identical output against main. resolve.py --check passes, smoke 34/34, sync and the redundancy audit are clean, and conformance has 0 failed.

@braboj
braboj merged commit 26fff5f into main Oct 17, 2026
1 check passed
@braboj
braboj deleted the fix/resolve-errors branch October 17, 2026 11:00
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.

Name a missing dependency and a dependency cycle in resolve.py errors

1 participant