You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
writ registers --store and reads it nowhere: status reports on the default store regardless #753
writ registers --store on its root and reads it nowhere. A user who points writ at another store gets a
report on the default one, with nothing said.
$ writ status --store /some/other/root
Layers:
...
Store: 0 run(s) folded <- folded from the DEFAULT store, not the one named
Root cause
A flag registered on a root that no leaf consumes.cmd/writ/writ/root.go:49 calls cli.AddOutputFlags(rootCmd, &outputOptions), so cobra advertises --filter, --jq, --output/-o, and --store on every writ command's help. Consuming them is a separate act, and writ performs it once:
outputOptions.Store is read by nothing. The same root cause produces #754 -- writ accepts any --output value, because
the string never reaches FormatterByName -- which is the milder face of it: that one accepts wrong input,
this one substitutes a different data source.
Why this one is not cosmetic
--store only means something when someone calls SetStoreRoot, and that has exactly one caller in the
tree:
cmd/devlore-test/devloretest/commands.go:61
Yet writ genuinely uses the execution store: readback.go reads cli.TracesDir() (lines 228, 247) and cli.GraphsDir() (line 500) to fold runs into its inventory. So the flag is not merely ignored -- writ reads
a different filesystem location than the one it was told to read, and reports the result as though it had
complied.
An absent flag errors and the user tries something else. A present flag that silently substitutes a
different data source produces a confident wrong answer.
Fix
writ resolves --store through cli.SetStoreRoot before any command that touches the store, restoring on
exit as devlore-test does. Every command reading TracesDir() or GraphsDir() is affected: status, repo, and anything else routed through readback.
Verification
writ status --store <tmp> reports on <tmp>, and reports zero runs when <tmp> is empty.
A relative --store resolves the way devlore-test's does; OpenTree requires an absolute path.
Deploying into a relocated store and reading it back reports what was deployed.
Activity
fix(cli): a registered flag is honored, and a number is a number (#753,
doc(cli): suite membership is infrastructure, and two version numbers (…
Every presentation is a presentation of the JSON: formatting rules, l…
writ reconcile: the command is renamed, and its renderings go through…