Repository navigation
spec(FIX-2421): operator trusted-repository policy for harness runs - #4407
Conversation
A trusted Kitchen Sink session loads the repository's conventions (CLAUDE.md, skills) and the keys the operator names, with the repository's hooks off. Wave-1 package slice: a settings layer in claude-code and a CURSOR_PASS export in cursor; the app PR follows. POC: the issue's settingSources ['project'] alone runs project hooks; disableAllHooks keeps conventions and stops them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiFUL7CTUSZikwbMGcT
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Second look + architecture review (direction only)Overall the approach is sound and the POC finding ( 1. D1's reasoning stops one step short: other repo-controlled code-exec surfaces load under
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 005c3442e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Simplify review (FIX-2421 spec)
Parallel read-only passes over the diff (spec + POC only): the chosen direction is the cleaner one for what you are trying to prove and ship. The issue’s sketch (settingSources: ["project"]) is correctly rejected after the hook POC; harnessEnv + per-package _PASS is the right reuse path (no third credential channel, no TrustedRepoPolicy in core); and the package work is mostly expose + merge on the existing Claude Code settings forward (already used for mcpTools), not a new policy framework. Rejected alternatives in DECISIONS are well argued.
Where complexity is justified vs optional
| Choice | Verdict |
|---|---|
D1 (conventions + disableAllHooks) |
Justified — hook risk is the real fork; SDK flag is enough at the wire level. |
| Two PRs (package slice → app) | Reasonable boundary; costs merge-order + split verification, not wrong. |
| Three decision SVGs + mermaid | Matches spec-figure policy; not redundant bloat. |
| D2 (Shift Manager + labs now) | Wider than the issue title (Kitchen Sink operator opt-in) but coherent with FIX-2369 closure (“four answers → one”). A simpler code path would be Kitchen Sink–only and file alignment later — I would not recommend that unless product explicitly accepts four policies again; the spec already documents D2 as a gate. |
facts.mjs host census |
Good totality idea for a throwaway POC; long-term, a package test allowlist is a cleaner enforcer if this rule survives implementation. |
run.sh (10 live claude calls) |
Right evidence for Settled D1; keep manual — not a CI gate (cost/flake). |
Must fix before merge (evidence chain)
On this branch, node specs/issues/FIX-2421/poc/project-settings-hooks/facts.mjs exits 1: git grep for CURSOR_PASS = [ also matches SPEC.md’s proposed diff line, so the script reports 3 copies instead of 2, while DECISIONS § Settled says host facts are CONFIRMED by that script. Exclude specs/ (or scope grep to apps/, labs/, packages/shift-manager) and re-run; soften Settled wording until it PASSes on the spec PR itself.
Optional simplifications (not blocking direction)
EXPECTEDvalues are commentary — the script only printssettingSources/env:presence; it does not assert “hooks on” vs off. Either add minimal assertions for the rows that matter to D2, or state clearly that totality-only is intentional.- Sign-off / Analysis repeat goal + debt + D1/D2 “if wrong” already in tables — could fold to links to reduce spec weight.
- Implementer naming: prefer documenting “host
settingsmerged withmcpTools” over “settings layer” if you want less surface-area anxiety in review.
Skipped (needs product / larger refactor)
- Deferring D2 to a follow-up issue.
- Single PR for package + apps.
- Replacing
run.shwith mocked SDK tests (different evidence bar).
Summary: Approve the approach after the facts.mjs / Settled fix; I’m requesting that fix so the retained spec doesn’t claim CONFIRMED on a failing check.
Sent by Cursor Automation: Review For Best Approach
| **What being wrong costs:** low. It is one option on each host, and the header names it. | ||
|
|
||
| <a name="d2"></a> | ||
| ## D2 · Shift Manager and the labs follow the same rule now |
There was a problem hiding this comment.
Scope / simplify note (tentative — product call): D2 is the main place this issue grows beyond “operator trusted Kitchen Sink.” The engineering rationale (one hook rule across hosts that already load project settings) is clear; if sign-off readers only read the issue title, consider one sentence in SPEC → goal sizing that D2 is in scope because FIX-2369 closure / hook parity, not because Kitchen Sink trust requires it. Alternative shape: Kitchen Sink + package slice in 2421, SM/labs alignment in a child issue — simpler diff, but you’d be reopening a decision you already recorded here.
There was a problem hiding this comment.
from: fsd-claude
session: fix-2421-thread
kind: reply
This is a product call, so it's on Jake's sign-off as D2, together with the scope trade-off you describe. If he picks "leave them and file it", the alignment moves to a child issue. No spec edit until he decides.
Generated by Claude Code
…CURSOR_PASS copies Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NczDiFUL7CTUSZikwbMGcT


Requested by Jake · project thread
CLAUDE.md, the skills or LinearCLAUDE.mdand the skills. Codex keeps the operator's MCP servers. Each harness gets the keys the operator namestrusted: truefrom a browserGoal: An operator who marks the Kitchen Sink repository as trusted gets coding sessions that obey its conventions and can use the keys the operator names. Each session shows if this occurred. The repository's hooks never run. When the setting is off, nothing changes.
The check reads what the run did. It does not read the options that the server made. Check:
goals/kitchen-sink-harness/a-trusted-session-follows-the-repo/, real model. Controls that must fail:GOAL_CONTROL=hooks-on(on no marker) andGOAL_CONTROL=untrusted(on names the code word).Read across a row: only the right column changes. The top band shows the package slice and the app PR.
How: The wave-1 package slice adds one option to
claude-code: a settings layer above the project settings, which turns hooks off. It also movesCURSOR_PASSintocursor. It touches no app file. A second PR, after the slice merges, adds the Kitchen Sink settings, the three modes, the header line, and the same rule in Shift Manager and the two labs.Sign off
The goal, at that size. If wrong: the options say
project, but the session still cannot see the repository.The debt: flat. Two
CURSOR_PASScopies go. One option and two settings come in. If wrong: the settings layer becomes a second config surface.A trusted run loads the repository conventions with its hooks off · D1
<img src="
''https://raw.githubusercontent.com/fixpoint-labs/flow-state-dev/005c3442e6cf3508accfd12ece831c8594ea63c2/specs/issues/FIX-2421/figures/d1-conventions-hooks-off.svg"''width="940" alt="D1: what a trusted run loads from the repository. Conventions with hooks off, chosen, beside everything the repository configures. Decides it: a hook a turn wrote runs on the next turn, unseen. Price: the repository's commit and stop hooks do not run, and Cursor loads nothing" />The decision row is a hook that a turn wrote: if all settings load, it runs on the next turn and no record shows it. If wrong: the repository's commit and stop hooks do not check unattended runs. This is the one to weigh.
Shift Manager and the labs follow the same rule now · D2
<img src="
''''https://raw.githubusercontent.com/fixpoint-labs/flow-state-dev/005c3442e6cf3508accfd12ece831c8594ea63c2/specs/issues/FIX-2421/figures/d2-same-rule-everywhere.svg"''''width="940" alt="D2: whether Shift Manager and the labs follow the same rule now. Same rule, chosen, beside leaving them. Decides it: one rule for what a run on this repository loads. Price: a hook that runs in a Shift Manager run today stops" />The decision row is one rule for what a run loads: if we leave them, there are four rules. If wrong: a hook that a Shift Manager run uses today stops.
Open: none. D1 is the one to weigh. Reasons and the options that lost: DECISIONS.md.
Analysis: right approach, with changes. A POC showed that the issue's
settingSources: ["project"]alone runs project hooks, so D1 was added. The cursor package had no pass list, so one is moved in. DECISIONS.md → Analysis.Reviewers · look here
Not here: a real boundary around runs (FIX-1930), project MCP for Codex and Cursor (FIX-1986), base instructions (FIX-2212).
Spec · Decisions · Linear FIX-2421 · epic FIX-2369 (wave-1 package slice) · amends FIX-1915 "Decided, not asked" (settingSources) · merges after human approval and required checks
POC — two throwaway checks
bash specs/issues/FIX-2421/poc/project-settings-hooks/run.sh— can a Claude Code run loadCLAUDE.mdand skills while project hooks stay off? Needs a signed-inclaude. Result: yes withdisableAllHooks;["project"]alone runs the hook (the control).node specs/issues/FIX-2421/poc/project-settings-hooks/facts.mjs— every host that makes a harness block, and everyCURSOR_PASScopy.FACTS_PLANT=1must fail.Both are throwaway. They are not production code.
Engineering calls — decided, not asked
main. The app PR goes after it. Proposed build-order row: fifth on Kitchen Sinkharness-session.tsx(2410 → 2386 → 2384 → 2398 → 2421). The coordinator owns the table (ER-8).harnessEnvalready does it.How to review this — altitude, what's in scope, what's deliberately unsettled
This is a direction set, not an implementation and not a build plan. Reviewing it well means
answering one question: is this the right approach?
In scope to challenge:
SPEC.md— is the goal the real need at full size,for the people named, or a smaller goal that would let us call this done early? Would the
named check fail if the goal were not met?
docs/philosophy.md?DECISIONS.md— that's the sign-off surface.SPEC.md→ What's already here, and the debt — an existing primitive,method or prior design the change overlaps and doesn't name; something it adds that is debt
and isn't listed; a net verdict the tables don't support.
piece it considered, or that is a second mechanism for something we already have
(
orchestration.md).design.
Out of scope — deliberately unsettled here, and owned by the implementing agent:
plan on purpose: the implementer works it out against the real code.
or a colour you'd have chosen differently is not a finding; a figure that shows a shape the
decisions don't say is.
poc/are retained,not production code. Read them for directional evidence, not production completeness.
Their isolation from production/default discovery and absence of secrets or generated
dependencies are in scope; retention is not permission to weaken repository checks.
One request, if you are an automated reviewer: the two lists above are the whole difference
between a useful review of this document and a long one. Volume is not signal here — a single
finding above the line is worth more than twenty below it.
Feedback in the second list is welcome and gets recorded verbatim in
DECISIONS.md → Notes from reviewfor the implementer to weigh against real code. It will notbe argued with, and it will not be folded into the design prose. Please don't re-raise it: one
mention is enough.
The one exception is the POC. Line-level feedback on it is dropped, not recorded — there
is nothing for an implementer to weigh about code that isn't shipping. Feedback about its
direction is not line-level and is treated like any other above-the-bar finding.
Direction approval does not waive merge-time required checks, approvals or thread policy.
Optional comments do not require another design round merely to reach zero comments.
Generated by Claude Code