Allowlist non-secret launch env and derive git identity from host config #1324

Merged
coilysiren merged 2 commits from issue-1296 into main 2026-07-15 06:29:40 +00:00
Member

Adds a typed host-env allowlist for terminal and locale context on launch, and resolves git identity from fleet attribution with git-config fallback instead of silently keeping the placeholder example-bot identity.

  • Passes TERM/COLORTERM, LANG, LC_, TZ, NO_COLOR, CLICOLOR, and CLICOLOR_FORCE while keeping raw host WARD_ and token-like values default-denied.
  • Prefers fleet attribution, then repo-local/global git config, when populating WARD_GIT_NAME/EMAIL.
  • Tests cover allowlisted terminal/locale env, denied secret-like env, and git identity precedence.
  • Local targeted go test ./cmd/ward -run ... passed; full go test ./cmd/ward still hits pre-existing defaults asset drift tests unrelated to this change.

closes #1296
ward.workflow: pull-request-and-merge

Adds a typed host-env allowlist for terminal and locale context on launch, and resolves git identity from fleet attribution with git-config fallback instead of silently keeping the placeholder example-bot identity. - Passes TERM/COLORTERM, LANG, LC_*, TZ, NO_COLOR, CLICOLOR, and CLICOLOR_FORCE while keeping raw host WARD_* and token-like values default-denied. - Prefers fleet attribution, then repo-local/global git config, when populating WARD_GIT_NAME/EMAIL. - Tests cover allowlisted terminal/locale env, denied secret-like env, and git identity precedence. - Local targeted `go test ./cmd/ward -run ...` passed; full `go test ./cmd/ward` still hits pre-existing defaults asset drift tests unrelated to this change. closes #1296 ward.workflow: pull-request-and-merge
Allow launch env allowlist and git identity fallback
Some checks failed
test / test (pull_request) Failing after 1m51s
1fdf4e65d6
Author
Member

WARDED_WORKFLOW: failed

details

workflow: pull-request-and-merge; review summary: review gate intentionally skipped because temporary ward default pending brokered QA.

The branch reached PR #1324, but test / test (pull_request) failed in go test before lint. Local focused tests for the changed env and git-identity paths passed; the repo-wide go test ./cmd/ward still shows pre-existing defaults asset drift failures unrelated to this patch.

Retrospective: the env allowlist was direct; the only wrinkle was keeping the placeholder fallback warning loud without spamming every test run. Confidence is moderate. Follow-up is to resolve the repo's asset-drift baseline or narrow the workflow if that failure is expected.

WARDED_WORKFLOW: failed ❌ <details><summary>details</summary> workflow: pull-request-and-merge; review summary: review gate intentionally skipped because temporary ward default pending brokered QA. The branch reached PR #1324, but `test / test (pull_request)` failed in `go test` before lint. Local focused tests for the changed env and git-identity paths passed; the repo-wide `go test ./cmd/ward` still shows pre-existing defaults asset drift failures unrelated to this patch. Retrospective: the env allowlist was direct; the only wrinkle was keeping the placeholder fallback warning loud without spamming every test run. Confidence is moderate. Follow-up is to resolve the repo's asset-drift baseline or narrow the workflow if that failure is expected. <!-- ward-agent-signature --> </details>
Merge remote-tracking branch 'origin/main' into issue-1296
All checks were successful
test / test (pull_request) Successful in 1m2s
c2878aad82
Sign in to join this conversation.
No description provided.