Skip to content

parser: lock topological import-order contract test#16816

Merged
pelikhan merged 1 commit intogithub:mainfrom
davidahmann:codex/issue-16808-topo-contract
Feb 19, 2026
Merged

parser: lock topological import-order contract test#16816
pelikhan merged 1 commit intogithub:mainfrom
davidahmann:codex/issue-16808-topo-contract

Conversation

@davidahmann
Copy link
Contributor

Problem

Import ordering regressions from topological to lexical order can silently change semantic dependency behavior in compiled outputs.

Why now

Import-related paths are actively touched and this ordering contract needs an explicit regression guard.

What changed

  • Added TestImportTopologicalSortBeatsLexicalParentOrdering in pkg/parser/import_topological_test.go.
  • The test asserts dependency edges win over lexical filename order.

Validation

  • make agent-finish (fails in baseline pkg/workflow tests unrelated to this change; see below)
  • go test -v ./pkg/parser -run TestImportTopologicalSortBeatsLexicalParentOrdering (pass)

Refs #16808

@davidahmann
Copy link
Contributor Author

Implemented the issue-scoped change with targeted regression coverage and validation:

  • added a minimal behavior guard tied directly to the reported ordering/state problem
  • kept the diff narrowly scoped to the affected codepath
  • ran focused local validation for the modified behavior

This contribution was informed by patterns from Gait: https://github.com/Clyra-AI/gait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants