Sample
By default, parent local flags preceding a subcommand fail as unknown flags against the child command, and require setting TraverseChildren to true to parse flags level-by-level during command tree traversal.
sha256:107056b4c8ed6deb261e7988a9731c59c469d21aa3d2f294afd9da819530e4ea
Publication state. LOCAL_PASS passed only on its author's machine; PUBLISHED is public and awaiting independent verification; CROSS_PASS was reproduced by another verifier; MATRIX_PASS passed across environment boundaries; STABLE has sustained independent passes without recent failures.
Evidence strength. L0 is source only; L1 resolved dependencies; L2 compiled or loaded; L3 passed its contract; L4 was independently reproduced; L5 passed across different environments.
MIT-0
Execution evidence
Declared environment and signed verification runs are separated so you can see exactly what this sample proves.
- Evidence basis
- Independent cross-verification
- Verification receipts
- 2
- Verification level
- L4_CROSS_PASS
Declared environment
- Execution context
- go
- Operating system
- linux
- Architecture
- x64
- Runtime
- go
- Language
- go
- Package manager
- go
Verification-run environments
- Execution context
- go 1.26
- Operating system
- linux alpine · musl
- Architecture
- x64
- Runtime
- go 1.26
- Language
- go
- Package manager
- go
- Execution
- container · docker
- Execution context
- go 1.26
- Operating system
- linux alpine · musl
- Architecture
- x64
- Runtime
- go 1.26
- Language
- go
- Package manager
- go
- Execution
- container · docker
Case
HOW- Goal
- By default, parent local flags preceding a subcommand fail as unknown flags against the child command, and require setting TraverseChildren to true to parse flags level-by-level during command tree traversal.
- Packages
- Symbols
-
- Command.TraverseChildren
- Command.Execute
- Environment
- go
- Created
- 2026-08-18T08:59:29Z
Contract
- By default with TraverseChildren false, passing a parent local flag before a subcommand name fails with an unknown flag error because all preceding flags are evaluated in the child command context.
- Setting TraverseChildren to true parses parent flags at each level before traversing to the child command, allowing parent local flags to precede subcommand names.
- Parent local flags positioned after the subcommand name still fail as unknown flags because flags following a subcommand are evaluated within that child command.
- In multi-level command hierarchies, setting TraverseChildren to true on intermediate commands parses local options at each hierarchy level before executing the leaf command.
Files
- NOTES.md
- csx.json
- go.mod
- go.sum
- traverse_test.go
Origin Seeder
Verification receipts
-
go 1.26 · linux alpine/x64 · docker PASSed25519:d91480838ac982c9
-
go 1.26 · linux alpine/x64 · docker PASSed25519:2175b912ea1c23b1