Skip to content

claudex harness: harden-guard, CODEOWNERS, bot identity (#56 W1) - #59

Merged
yogex merged 8 commits into
masterfrom
claudex-harden-w1
Dec 3, 2026
Merged

yogex merged 8 commits into
masterfrom
claudex-harden-w1

Conversation

@yogex

@yogex yogex commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Issue #56, W1: close the two bypasses. The owner merges; the engine never does.

What changes

  • harden-guard (.github/workflows/claudex-guard.yml, harness/scripts/guard.sh): fails when an agent PR changes todo-cal/tests/acceptance/**, harness/**, project/** or .github/**. A PR counts as the agent's if it has, or ever had, the bengine label, or its author is the bot login (guard.agent_logins / repo variable CLAUDEX_AGENT_LOGIN). The label name and the paths are config (guard.* in claudex.json), so the guard is generic.
  • The guard also runs locally as the guard check in checks.sh, when the engine's workflows set CLAUDEX_AGENT=1.
  • CODEOWNERS (.github/CODEOWNERS): the same paths, owned by @yogex.
  • Forge: every PR gets the bengine label. CLAUDEX_BOT_TOKEN, when set, is used for every gh call. The existing refusal to merge a harden PR stays.
  • Engine target: project/claudex.json now uses base_branch: master and branch_prefix: claudex-harden- (owner answer 2).
  • Owner steps: harden-pipeline/OWNER-SETUP.md (bot, then branch protection). Merge this PR first: protection can only require harden-guard once the workflow is on master.

Deviation from #56's wording

#56 says to add the job to orchestrator-sim-claudex.yml. It is in its own file instead, with no path filter. A required check must run on every PR into master, and that workflow only runs when orchestrator-sim-claudex/ changes. The job runs the base commit's guard.sh and config, so a PR can't edit the guard to pass itself. A PR that edits the workflow file itself is a .github/ change, which goes to Code Owner review.

Evidence

harden-pipeline/EVIDENCE.md:

This PR changes protected paths, but it is not labelled bengine (it is the orchestrator's harness work under #56), so harden-guard doesn't apply to it. master doesn't have the guard yet, so the guard runs the PR's own copy this one time.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
…W1)

The guard fails an agent change to a protected path. Agent work is known by the
bengine label (now or ever), a configured bot login, or CLAUDEX_AGENT=1 in the
engine's workflows. CI runs it on pull_request_target from the base branch's copy.
Engine base branch is now master with the claudex-harden- prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
pull_request_target takes its workflow from the default branch, so it never
ran for PRs into the pipeline branch, and couldn't be checked from here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
… fails)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
… checkpoint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efoipS4sWRj5GT8zzaEGZ
CONTRACTS.md: keep master's spec_dir paragraph in the state section,
then the guard section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
@yogex
yogex merged commit 38386c6 into master Dec 3, 2026
2 of 3 checks passed
yogex pushed a commit that referenced this pull request Dec 3, 2026
- README: master's template and spec.sh lines plus this branch's
  verifier, owner-decision and nudge entries.
- ship.yaml pr node: this branch's verify handoff plus master's
  feature variable for the spec.sh line.
- selftest.sh: keep both test blocks. One fake gh api arm: guard tests
  (FAKE_ISSUE set) get JSON, owner-decision tests get event lines. The
  two arms clashed silently and broke the guard tests.
- ship.yaml push and checkpoint-harden: assign draft_reason before
  quoting it (Archon warned on the quoted substitution).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
yogex pushed a commit that referenced this pull request Dec 3, 2026
No conflicts: master already holds #59's CONTRACTS.md resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016efois1hjx9JeuGhxWixrm
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.

2 participants