Skip to content

Hooks guard the common forms only: remove the anti-trick checks (T909) - #469

Merged
erickb336 merged 7 commits into
mainfrom
sage/t909-common-guards-only
Nov 9, 2026
Merged

erickb336 merged 7 commits into
mainfrom
sage/t909-common-guards-only

Conversation

@erickb336

Copy link
Copy Markdown
Owner

What this is. Guard cleanup PR 1 (T909). By the owner's decision of 2026-11-08 (standing order 70), the hooks guard ordinary commands against honest mistakes. This PR removes every check in the Claude hook, the Codex gate and core that existed only to stop a deliberate trick (PE R2842 items R1 to R19, and the chief's call Q1 a). GitHub's protection of main, the merge check, the sandbox and the owner's phrases stay the guards against tricks.

Still refused, in both hooks (keep matrix, 55 rows): each common gh pr merge form that is not the one merge form; a push with --force, +ref, main or master, --mirror, --all, the default branch that GitHub names, no branch, or from a checkout on the default branch; a push of another chief's branch; git subtree push, gh repo sync, gh repo edit --default-branch; a literal shell write into the logbook roots; the agent state-tool, gh, stash and process rules; the board rules.

Now documented limits (they pass): GitHub API merges and branch writes (gh api, GraphQL, curl, wget); unknown wrapper programs; git aliases and unknown git subcommands; patterns and option order in command words; git settings that redirect a push; code that loads the state tool; a path through a link; PowerShell syntax; look-alike letters of another script. The .git and hooks-path rule is gone (Q1 a, it also refused husky).

Codex gate: no read rule for the sage folder; writes and patches into the sage folder and the shared root meet core's logbookWrite. A child's gh meets core's AGENT_GH. Codex is known by its name.

T903 lows folded in: F-T903-7 (find ~ -name '*.tmp' -delete, chmod -R u+w ~ pass), F-T903-10 (rm of a project link to the shared root passes), F-T903-6, -8, -9 (guide and workflow text).

Kept part: a patch into a .git folder in Codex still meets the checkout rule of runtime/managed-worktree.mjs (not a hook rule; T732 keeps that file).

Lines: source −1,065 / +215, tests −978 / +313 (against the merge base). Change note: changes/T909.md. No CHANGELOG.md edit. git merge-tree against T732's branch is clean.

🤖 Generated with Claude Code

erickb336 and others added 7 commits November 8, 2026 16:56
Owner 2026-11-08 (standing order 70): a disguised form is a documented
limit. Remove every check in the Claude hook, the Codex gate and core
that existed only to stop a deliberate trick, and keep the plain checks
of common mistakes and the safety core.

- core: drop wrapper reading (programAmong, gitOrGh), the API, GraphQL,
  curl and wget merge and main-write rules, nested-push and beside-push
  rules, KNOWN_GIT, the planted git settings checks, the deep part of
  unreadableSend, expansionProblem and ghOptionBefore, the external
  command operands, runnable and harmless, the PowerShell launch module,
  the node -e/-r/--import guess, per-word link following, look-alike
  letters, and shellExecutionUncertain.
- Claude hook: drop the .git rule (Q1 a), the board's physical path
  check, PowerShell handling and the F-T289-6 close rule.
- Codex gate: drop the sage-folder read rules (logbook writes and
  patches use logbookWrite), GH_PATHS (children use core's agent list),
  Codex binary rename detection and the .git rule.
- F-T903-7, F-T903-10: find -delete and chmod -R count only when a word
  names a path in a root; rm of a link to a root passes.
- Keep matrix shrunk to the common forms; tests of removed checks gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ariable, a documented limit (T909)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in T732 (PR 467), which deleted the Codex native runtime and moved
the codex-native fixture tests to scripts/. The T909 edit of the autopilot
gate test follows its file to scripts/codex-autopilot-gate.test.mjs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in T914 (PR 468), which deleted the core code that only the Codex
native runtime used. The one conflict, the shell-write export line of
sage-core/index.mjs, keeps both removals: T914 drops shellWriteOutsideRoots
and its module, and T909 drops shellExecutionUncertain. The plugin copies
come from npm run build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in; texts match the code

- F-T909-5: chmod, chown, chgrp and chflags with -R count in any line when a word
  names a root or a path in one (chmod -R 000 ~/.sage). A folder that only holds a
  root (chmod -R u+w ~) still passes (F-T903-7). New keep-matrix, Codex gate and
  provider rows.
- F-T909-1: the texts of command-runs, the Codex guide and rules-in-code say the same.
- F-T909-2: rules-in-code's push row says a push inside or beside other commands
  meets the push form.
- F-T909-3: the providers test no longer passes stateToolPath to createCommandPolicy.
- F-T909-4, F-T909-6: filler letters in a gate question and find -delete with no
  filter over home are in the limits list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@erickb336
erickb336 merged commit 0ef4f47 into main Nov 9, 2026
6 checks passed
@erickb336
erickb336 deleted the sage/t909-common-guards-only branch November 9, 2026 03:55
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