CodeSampleX

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

go 1.26 · linux alpine/x64 · docker PASS
Execution context
go 1.26
Operating system
linux alpine · musl
Architecture
x64
Runtime
go 1.26
Language
go
Package manager
go
Execution
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-18

go 1.26 · linux alpine/x64 · docker PASS
Execution context
go 1.26
Operating system
linux alpine · musl
Architecture
x64
Runtime
go 1.26
Language
go
Package manager
go
Execution
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-18

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

  1. 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.
  2. Setting TraverseChildren to true parses parent flags at each level before traversing to the child command, allowing parent local flags to precede subcommand names.
  3. Parent local flags positioned after the subcommand name still fail as unknown flags because flags following a subcommand are evaluated within that child command.
  4. 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

Download the source artifact (tar.gz)

Origin Seeder

csx-seed

Verification receipts

  • go 1.26 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS golang@1
    ed25519:d91480838ac982c9
  • go 1.26 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS golang@1
    ed25519:2175b912ea1c23b1