backlog: file #1062, check reads env values from cwd after validating them under --project-root - #236
Closed
wshallwshall wants to merge 1 commit into
Closed
backlog: file #1062, check reads env values from cwd after validating them under --project-root#236wshallwshall wants to merge 1 commit into
wshallwshall wants to merge 1 commit into
Conversation
… them under --project-root
`messagefoundry check --project-root R` anchors --config under R and HARD-FAILS
if R/<env_dir>/<env>.toml is absent -- then drops R. run_checks takes no project
root, so the build check re-derives the value anchor from Path.cwd(). The gate
verifies the file under the root you supplied and reads the values from wherever
the shell happens to be.
Verified by reading the chain end to end rather than inferring from a grep:
__main__.py:832 root = resolve_project_root(args.project_root, cwd)
__main__.py:848-52 hard-fail if <root>/<env_dir>/<env>.toml is absent
__main__.py:853 return config_dir, service_config <- root DROPPED
__main__.py:4263+ run_checks(...) <- no root parameter
checks.py:1304 resolve_values_base_dir(..., cwd=Path.cwd())
environments.py:79 `if not base_dir: return cwd` <- unset by default
SERVE GETS IT RIGHT ONE SCREEN AWAY: __main__.py:1086 writes args.project_root
into cli["environments"]["base_dir"] before load_settings, and :1095 records
that this is exactly why. check never sets it.
THE COMMENT ABOVE THE DEFECT CLAIMS THE PARITY THAT IS MISSING, which is the
sharpest evidence it is an oversight and not a decision. checks.py:1300-1302
says "Resolve env() against the active environment the same way serve does".
Serve's way IS the base_dir assignment. The comment states the goal and the code
omits the step that achieves it.
Consequence in the conditional per section 0: build-check is a required blocking
check for the ADR 0092 posture-keyed insecure-hop refusal, whose hosts and
schemes are env()-supplied. From a cwd holding a different environments/<env>.toml
the refusal is decided against the WRONG values while the operator was told the
root was validated, and no diagnostic names the directory read -- the AC-4
cwd-differs-from-root warning is serve-only.
Reachability stated honestly: nothing in this repo passes --project-root to
check, so it is supported-but-not-exercised-here, which is also why no test
caught it. That is not the same as unreachable -- it is the documented consumer /
config-repo invocation, ratified by ADR 0050 AC-6.
Held as RELAYED-NOT-CONFIRMED from a sweep since 2026-08-05 and filed only after
the chain was read. A subagent's severity ranking is not evidence.
Number allocated atomically from the committing worktree. Headings +1;
parse_items reports every item declaring exactly one status.
wshallwshall
enabled auto-merge (squash)
August 6, 2026 09:45
Collaborator
Author
|
Superseded by a fresh cut off current main. #1063 (PR #237) merged first, leaving this branch's base squash-merged away, so rebasing it would hit the pre-squash-base trap and a force-push would rewrite a branch whose ledger entitlement belongs to another worktree. The item is re-filed unchanged from the allocating worktree; see the replacement PR. No content is lost -- f9bea40 remains readable in the shared object store. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Files BACKLOG #1062. Docs-only, one file, +37. No fix, no code change.
THE DEFECT.
messagefoundry checkaccepts an explicit--project-root, validates that<root>/<env_dir>/<env>.tomlEXISTS under it, and then DROPS the root._check_buildre-derives the value anchor from
Path.cwd(). So build-check verifies the file under thesupplied root and READS THE VALUES from wherever the shell happens to be standing.
CHAIN, read end to end rather than inferred from the symptom:
servedoes it correctly in the same file (:1086), writing the project root intoenvironments.base_dirbeforeload_settings, with a comment saying why. The commentdirectly above the defect claims parity with
serve, and the missing step is exactly thatparity.
WHY IT IS FILED SEPARATELY. This is the fourth instance of one premise: THAT WHERE A
COMMAND RUNS IS WHERE THE CALLER IS. The other three are #1057 (occupancy places sessions
by cwd, so it cannot see a session writing by absolute path from elsewhere -- the script
puts that at 29% of writes on this repo), #1059 (the worktree gate resolves paths against
the session cwd, so a shell variable defeats it), and #1060 (alloc.ps1 takes the owning
worktree from
git rev-parse --show-toplevel). All four fail SILENTLY and in thebenign-looking direction.
This one is the most significant of the four because it is on the ENGINE surface rather
than the coordination scripts, which is where nobody was looking. No theme item was filed
for the pattern -- "four mechanisms share a premise" has no fix and no closing condition,
and the premise is already recorded as prose in docs/WORKTREES.md (#1060) where it
outlives any single item.
Claims to violate ADR 0050 AC-6 with an untested acceptance criterion.
VERIFICATION. Based on 0a994e0, merge-tree CLEAN against current main. Headings
139 -> 140, exactly one added and nothing lost. Number allocated atomically from the
committing worktree.