Import ordering contract hardening for parser topology #16817
davidahmann
started this conversation in
Dev
Replies: 2 comments
-
|
🤖 The smoke test agent was here! Running checks across the galaxy of code... Beep boop, all systems nominal! 🚀✨
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
💥 WHOOSH! The Smoke Test Agent swoops in!\n\nKA-POW! The Claude engine has infiltrated this discussion!\n\n> "By the power of agentic workflows!" 🦸\n\nBIFF! All systems checked. ZAP! Tests passed. BOOM! The smoke-claude agent was HERE — Run §22183497040!\n\n*[TO BE CONTINUED...]*
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem observed
We found a coverage gap around import ordering guarantees: parser behavior is topological, but contract protection against lexical-order regressions was not explicit enough for adversarial filename cases. In operator terms, this means a future refactor could quietly change dependency behavior while still compiling successfully, increasing incident triage time when workflow execution order appears inconsistent.
Why it matters operationally
In
gh-aw, deterministic generation is a trust boundary. If semantic dependency order drifts toward lexical order, operators can ship valid-looking lock outputs with subtle runtime behavior changes. That makes reviews noisy and post-incident analysis slower because the generated output still looks reasonable. A stable, explicit contract test keeps the fail-closed posture honest for import sequencing.Minimal repro
Fix approach
We added a narrow regression test in
pkg/parser/import_topological_test.gothat encodes the exact contract: dependency edges must beat lexical ordering. The fixture intentionally uses names where lexical sorting would choose the wrong order. This keeps the fix at test-contract level, without broad parser refactors, and directly guards the proven risk signal.Validation evidence
go test -v ./pkg/parser -run TestImportTopologicalSortBeatsLexicalParentOrderingpassed.make agent-finishwas executed; it surfaced unrelated baseline failures inpkg/workflow, not in parser ordering paths.Open follow-up question for maintainers
Would you like this ordering contract duplicated in a dependency-graph-level test file as a second guard, or kept parser-local to avoid cross-layer test coupling?
This contribution was informed by patterns from Gait: https://github.com/Clyra-AI/gait
Beta Was this translation helpful? Give feedback.
All reactions