Skip to content

Gitmoot: GITMOOT-COC -> WAVE-IMPL: IMPLEMENT gitmoot#1466 — a one-line - #1471

Merged
jerryfane merged 2 commits into
mainfrom
gitmoot/adhoc-4534e9df
Aug 4, 2026
Merged

Gitmoot: GITMOOT-COC -> WAVE-IMPL: IMPLEMENT gitmoot#1466 — a one-line#1471
jerryfane merged 2 commits into
mainfrom
gitmoot/adhoc-4534e9df

Conversation

@jerryfane

Copy link
Copy Markdown
Collaborator

WHAT:
CODEX: Implemented #1466 from origin/main 2487742. org brief now defaults --role from GITMOOT_ORG_ROLE while preserving explicit-flag precedence and the existing missing-role exit.

WHY:
Gitmoot finalized this implementation from a task worktree.

CHANGES:

  • Committed changes from /root/.gitmoot/worktrees/gitmoot--gitmoot/adhoc-4534e9df

RESULTS:

  • Clean TestRunOrgBriefRoleResolution passed; the complete TestRunOrgBrief family also passed.
  • G1 REMOVE_ENV_FALLBACK failed as required: brief code = 2, want 0; stderr="org brief requires --role NAME\n".
  • G1 independence run: flag_precedence passed while REMOVE_ENV_FALLBACK was active.
  • G2 ENV_OVERRIDES_FLAG failed as required: brief role = "owner", want "review".
  • G2 independence run: env_fallback passed while ENV_OVERRIDES_FLAG was active.
  • G3 DEFAULT_MISSING_ROLE_TO_OWNER failed as required: brief code = 0, want 2; stderr="".
  • Each mutation built. internal/cli/org.go restored to SHA-256 081547fa2da7544d798a8665d9ea6055f058c62fa035202bbfc02e3c34a664b8 after every mutant.
  • npm run build:llms completed twice; the second run left git diff --exit-code clean for llms-full.txt.
  • git diff HEAD --check passed.

RISK:
Review the generated diff before merging.

TASK:
adhoc-4534e9df

AGENTS:

  • wave-impl

RAW FINAL REVIEW OUTPUT:

CODEX: Implemented #1466 from origin/main 2487742e6bcf6891c1343de82a2bfcec5df24cd3. org brief now defaults --role from GITMOOT_ORG_ROLE while preserving explicit-flag precedence and the existing missing-role exit.

@jerryfane

Copy link
Copy Markdown
Collaborator Author

Agent: wave-impl
Runtime: codex
Job: local-implement-wave-impl-18c8a133651aa146

Decision: implemented
Summary: CODEX: Implemented #1466 from origin/main 2487742. org brief now defaults --role from GITMOOT_ORG_ROLE while preserving explicit-flag precedence and the existing missing-role exit.

Findings

  • Verified org escalate, directive send/ack/done, org await, agent dispatch, and task dispatch already use the environment role fallback.
  • Both CLI references depicted --role as mandatory syntax, so they required correction.
  • No full suite or coordinator gate was run.

Changes Made

  • internal/cli/org.go::runOrgBrief sets the flag default from GITMOOT_ORG_ROLE.
  • internal/cli/org_test.go::TestRunOrgBriefRoleResolution guards environment fallback, explicit-flag precedence, presence stamping, and the missing-role error.
  • skills/gitmoot/references/CLI.md and website/docs/reference/cli.md document the optional flag, environment fallback, and precedence.
  • website/static/llms-full.txt was regenerated from the corrected documentation.

Tests Run

  • Clean TestRunOrgBriefRoleResolution passed; the complete TestRunOrgBrief family also passed.
  • G1 REMOVE_ENV_FALLBACK failed as required: brief code = 2, want 0; stderr="org brief requires --role NAME\n".
  • G1 independence run: flag_precedence passed while REMOVE_ENV_FALLBACK was active.
  • G2 ENV_OVERRIDES_FLAG failed as required: brief role = "owner", want "review".
  • G2 independence run: env_fallback passed while ENV_OVERRIDES_FLAG was active.
  • G3 DEFAULT_MISSING_ROLE_TO_OWNER failed as required: brief code = 0, want 2; stderr="".
  • Each mutation built. internal/cli/org.go restored to SHA-256 081547fa2da7544d798a8665d9ea6055f058c62fa035202bbfc02e3c34a664b8 after every mutant.
  • npm run build:llms completed twice; the second run left git diff --exit-code clean for llms-full.txt.
  • git diff HEAD --check passed.

Needs

  • Coordinator full gate, intentionally not run by this job.

Raw runtime output was retained in local Gitmoot state and is not posted here.

@jerryfane

Copy link
Copy Markdown
Collaborator Author

Agent: gm-review-opus
Runtime: claude
Job: local-review-gm-review-opus-18c8a2f74b046dc9

Decision: approved
Summary: GM-REVIEW-OPUS review of PR #1471 (#1466, org brief defaults --role from GITMOOT_ORG_ROLE). SHA REVIEWED: 89f5322. WORKTREE HEAD FOUND: 89f5322. THEY AGREE — git cat-file -t printed commit and the seat was clean. I did not run the gate; review kept proportionate to a +62/-4 change, working in-seat. ITEM 1, PRECEDENCE IS CORRECT AND STRUCTURAL RATHER THAN HAND-ROLLED: internal/cli/org.go::runOrgBrief passes the env var as the flag's DEFAULT VALUE — fs.String("role", strings.TrimSpace(os.Getenv("GITMOOT_ORG_ROLE")), "organization role to brief") — and Go's flag package only overwrites a default when the flag is explicitly present. So 'the explicit flag wins' is guaranteed by stdlib semantics, with no precedence conditional that a later edit could invert. That is the safest available shape for exactly the risk named. I re-derived G2: injecting an env-overrides-flag branch BUILDS and fails with 'brief role = "owner", want "review"' — the reported message verbatim — killing ONLY the flag_precedence subtest while env_fallback and missing_role passed. ITEM 2, THE ERROR PATH SURVIVED INCLUDING ITS TEXT: 'org brief requires --role NAME' sits at line 883 in both origin/main and HEAD, byte-identical, so runbook greps are unaffected. The guard asserts the exact stderr string including its trailing newline (stderr.String() != test.wantStderr) in addition to exit code 2, so a reworded message would fail the guard too rather than only a changed code. I re-derived G3: silently defaulting a missing role BUILDS and fails with 'brief code = 0, want 2' — again verbatim — killing ONLY the missing_role subtest. ITEM 3, THE GUARD ASSERTS THE STAMP, WHICH IS THE DISTINCTION THAT MATTERS: org_test.go::TestRunOrgBriefRoleResolution opens the store and asserts on ListOrgRolePresence with len(presence) != 1 || presence[0].Role != wantRole || presence[0].LastCommand != "org brief". An implementation that resolved the r
[truncated]

Tests Run

  • PROTOCOL binding check: git rev-parse HEAD in my seat = 89f5322, identical to the SHA in the brief prose; git cat-file -t printed commit; seat clean (0 dirty)
  • scope: git diff --stat origin/main...HEAD = 5 files, +62/-4 (internal/cli/org.go, internal/cli/org_test.go, skills/gitmoot/references/CLI.md, website/docs/reference/cli.md, website/static/llms-full.txt)
  • ITEM 1 mechanism: read runOrgBrief — the env var is the flag DEFAULT, so precedence is enforced by flag.Parse semantics rather than a hand-written conditional
  • ITEM 2 message identity: org brief requires --role NAME present at line 883 in BOTH origin/main and HEAD
  • ITEM 3: read the guard — it opens the store and asserts ListOrgRolePresence has exactly one row with the expected Role and LastCommand == "org brief", i.e. the presence STAMP rather than the resolved string
  • BASELINE: TestRunOrgBriefRoleResolution PASSES with all three subtests — env_fallback, flag_precedence, missing_role (ok 0.566s)
  • G2 ENV_OVERRIDES_FLAG re-derived (injected an env-wins assignment before the validation block, applied exactly once): BUILDS; killed ONLY flag_precedence with 'brief role = "owner", want "review"'; org.go restored, sha256 MATCHES
  • G3 DEFAULT_MISSING_ROLE_TO_OWNER re-derived (default the empty role to owner, applied exactly once): BUILDS; killed ONLY missing_role with 'brief code = 0, want 2; stderr=""'; org.go restored, sha256 MATCHES
  • ITEM 4: git diff --numstat on internal/cli/org.go = 1 added / 1 removed; the diff contains exactly the one fs.String("role", ...) before/after pair, so no sibling verb was modified
  • ITEM 5: CLI.md adds 'org brief --role defaults to GITMOOT_ORG_ROLE; an explicit flag wins.'; the website reference adds 'defaults --role to GITMOOT_ORG_ROLE, with an explicit flag taking precedence,'; llms-full.txt carries the same precedence sentence; both usage lines became '[--role owner]'
  • FINAL: org.go sha256 081547fa2da7544d798a8665d9ea6055f058c62fa035202bbfc02e3c34a664b8, seat HEAD 89f5322, 0 dirty, go vet ./internal/cli/ clean, TestRunOrgBrief* ok 1.380s
  • COULD NOT VERIFY: (1) the gate — not run, per instruction; I relied on your reported build 0 / vet 0 / test 0 with internal/cli ok 591.997s; (2) live end-to-end presence stamping against a real daemon and the presence-driven machinery that read the seat as ABSENT — the guard exercises the store through the real CLI entrypoint but not a running daemon; (3) that the sibling org verbs genuinely already default correctly — I confirmed only that this PR did not touch them, taking your fence at face value rather than auditing them, since that was explicitly out of scope; (4) the llms-full.txt regeneration convergence (your reported clean second run) — I checked the committed content carries the precedence sentence but did not re-run the generator.

Raw runtime output was retained in local Gitmoot state and is not posted here.

@jerryfane
jerryfane marked this pull request as ready for review August 4, 2026 15:48
@jerryfane
jerryfane merged commit b7aba69 into main Aug 4, 2026
27 checks passed
@jerryfane
jerryfane deleted the gitmoot/adhoc-4534e9df branch August 4, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant