Skip to content

Releases

v7.33.2

Choose a tag to compare

@github-actions github-actions released this 01 Dec 14:33
d360d88

Fixed

  • enforce-writes-scope.cjs now denies a write whose payload path holds a NUL byte, as protect-trusted-paths.cjs
    has since 6.73.1.
    Audit SEC-11 added that deny to protect-trusted-paths.cjs only. enforce-writes-scope.cjs kept
    judging such a path by its scope like any other name, so it allowed a NUL-bearing path its scope allowed: in an
    installed project with no scope and no open run, x\u0000y.md (exit 0); in PHARN's dev checkout, an in-scope path
    such as .dev/features/x/PLAN.md followed by a NUL. Both guards now exit 2 on every row the new table measures (a NUL
    in file_path, path, notebook_path, edits[].file_path, and with no tool name, in a dev and an installed
    project), with the fixed message a path contains a NUL byte, which echoes nothing from the path. Before, the dev
    checkout's scope deny named the path in its message. Node's fs refuses such a name, so no file was written either
    way: this is parity between the two guards, not a closed hole. The deny covers write calls only: a read tool carrying
    a NUL path is still allowed unread by both, as every non-write tool is. The guard and pharn/LIMITS.md §7 (its list
    of input the guards deny now names "a write call whose path holds a NUL byte") were changed by the maintainer, who ran
    two reviewed patch scripts. guard-pathless-write.test.cjs drops the parity exception 7.33.1 recorded for this row:
    it now holds six NUL rows, one with an in-scope path whose exit code moves in both postures, plus a Read row with a
    NUL path that both guards allow, and asserts both guards agree on every row. Against the 7.33.1 guards its two ROWS
    tests and the new fixed-text test fail.

    Why patch: a correction to shipped guard behaviour. No contract, field or wiring changed, and MIN_CLI is
    unchanged.

v7.33.1

Choose a tag to compare

@github-actions github-actions released this 01 Dec 09:56
f9431d2

Fixed

  • Both write guards now deny a write call that carries no path they can read, instead of allowing it (CORE-628).
    A call whose tool name is Write, Edit, MultiEdit or NotebookEdit (any letter case), or that names no tool,
    and that has no string path in file_path, path, notebook_path or edits[].file_path was allowed by both
    protect-trusted-paths.cjs and enforce-writes-scope.cjs: their per-path decision ran over zero paths and passed.
    That covered a path sent under another key (target_file, say), a number, and a missing tool_input. An empty path
    is denied too; before, enforce-writes-scope.cjs denied it and protect-trusted-paths.cjs allowed it. Both guards
    now exit 2 with a fixed message that echoes nothing from the payload. No Claude Code route to these payloads is known,
    since its four write tools always carry file_path or notebook_path. The change sets what happens when Claude Code
    renames a field, and when another harness that reads .claude/settings.json starts the guards with its own payload:
    one that sends the path under another key is now denied every write, where before it was allowed every write without
    a word.

    A tool name outside the four is still allowed unread, so a guard wired under a wider matcher leaves Read and Bash
    alone; a harness that starts the guards under another name for its write tool gets no protection from them.
    pharn/LIMITS.md §7 states that bound with the measured before/after table, measured in a dev checkout and in an
    installed project. The new guard-pathless-write.test.cjs runs one table of 20 payloads against both guards in both
    postures and asserts the expected exit code and that both guards agree. Each denied payload has a twin with a readable
    in-scope path that must be allowed, so the deny is attributed to the missing path. Against the 7.33.0 guards the
    table's deciding tests fail.

    One difference between the guards was found and left as it was: in an installed project with no scope and no open
    run, enforce-writes-scope.cjs allows a path holding a NUL byte that protect-trusted-paths.cjs denies. The test
    records it as the table's one exception.

    Why patch: a correction to shipped guard behaviour. No contract, field or wiring changed, and MIN_CLI is
    unchanged.

v7.33.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 22:45
4b76ee2

Changed

  • Both write guards are now wired in exec form, as the Stop guard has been since 6.12.0, so no shell sits between
    Claude Code and either guard (CORE-625).
    The shipped .claude/settings.json wires protect-trusted-paths.cjs and
    enforce-writes-scope.cjs as "command": "node" with "args": ["${CLAUDE_PROJECT_DIR}/.claude/hooks/<guard>.cjs"]
    and "onFailure": "block", under the unchanged matcher. In the old shell form,
    node "${CLAUDE_PROJECT_DIR}"/.claude/hooks/<guard>.cjs, the placeholder was substituted into a sh -c string
    (Git Bash or PowerShell on Windows), so a project path containing ", a backtick, $ or \ could stop the guard
    from starting, or run text from the directory name. In exec form Claude Code starts node directly with the path as
    one argument. What the guards decide does not change, and no hook script changed. hook-wiring.test.cjs now spawns
    the committed entries without a shell on every platform (it no longer skips the guards on Windows, though CI runs on
    Linux only). Each entry denies a trusted-doc write from a subdirectory, and also from a project whose path holds a
    space, $, a backtick and ". The negative controls: a relative args path does not start, the old shell-form
    string fails the pin, and in that project the shell form does not start, while with only a space in the path it does.
    pharn/LIMITS.md §7 replaces the path-character bound with the exec-form bullet. A project path containing \ is
    still not claimed, because the guards' own path folding reads a backslash as a separator.

    Exec form needs Claude Code 2.1.139 or later, the release whose changelog adds hook args. onFailure came in
    2.1.295, so every client that blocks on a failed guard also has args. An older client was not measured. If it
    ignores args, it starts bare node, which reads the hook payload on stdin as a script and exits 1 (measured with
    Node 24.13.1), and the write goes through. On such a client, upgrade Claude Code, or keep the shell-form lines.

    Existing installs: pharn update first, then the wiring; roll back in the reverse order. pharn update never
    edits settings.json, so an install keeps its shell-form lines, which still work, with the path bound above. Measured
    with pharn-cli 0.23.0's own diffHookWiring (its src/lib/hook-wiring.ts) on a 7.32.2 settings.json against this
    one: pharn status reports the hook wiring missing for both guards, prints a REPLACE note showing your line and
    the shipped one for each, and pharn status --strict exits 1 until both are replaced. A pre-7.3.0 line without
    onFailure gets the same two REPLACE lines, so one edit per guard clears both changes. For an install made on 6.0.0
    this is the fourth hand edit of settings.json: anchoring (6.1.0), the Stop entry (6.12.0), onFailure (7.3.0),
    and this. No other hand edit is in this release.

    Why minor: the shipped wiring changed, and every install must copy it again for pharn status --strict to pass.
    Nothing an existing install runs stops working, so it is not major. MIN_CLI is unchanged, because pharn-cli writes
    settings.json only when it is absent. The settings change and the LIMITS.md edit were applied by the maintainer
    outside the agent loop, before the build's reconciliation anchor (L68, L88). Record:
    .dev/features/guard-exec-wiring/.

v7.32.2

Choose a tag to compare

@github-actions github-actions released this 30 Nov 15:29
b89bb3b

Fixed

  • entry-gates.mjs --abort stops the entry gate runner and the gate it is running when ps cannot run, as under
    Claude Code's Bash sandbox on macOS (CORE-615).
    /bin/ps is setuid root and the sandbox refuses its exec, so the
    loop's stop printed ps is unavailable, so the recorded pid could not be verified; nothing was signalled and left the
    runner and its test suite running (.dev/measurements/sandbox-probe-2026-11-29.md, L3). The runner now writes its own
    witness: a worker thread rewrites pharn/.run/pharn-entry/beat.json (nonce, feature, pid, a rising seq) every
    250 ms. When ps cannot run, --abort counts the recorded pid as this runner only if two reads bound to the runner
    record show a greater seq within 10 s; anything else (no beat, a beat that stopped, a beat for another nonce) leaves
    the pid unverifiable and nothing is signalled, as before. With no ps -A listing, the gate stopped is the group
    run-gates records in gates/lock.child, read after the runner is frozen. ps stays first when it runs. The same
    applies to --start superseding an earlier runner. Bounds: a gate's own detached process groups are not reached
    without ps; a runner that dies after its last beat and whose pid is reused within the window would be misread (the
    same class as the gap between a ps read and the signal); both records live under pharn/.run/, so this is a
    tested rule over unauthenticated records, never provenance, and it is weaker than ps against a forger: the beat's
    pid is self-reported, so a writer of pharn/.run/ can aim the ps-free --abort at any process group the same user
    owns (one it could signal itself). Unchanged and still fail-closed without ps: --wait (a live pid reads alive),
    run-gates' orphan reap (a group whose start cannot be read is not signalled) and stage-direct's liveness reads (a
    live pid reads alive); in a normal run these readings are correct, and only a crash or a reused pid makes them cost
    anything (a wait, or a refusal a person clears).

v7.32.1

Choose a tag to compare

@github-actions github-actions released this 30 Nov 14:34
05e0cb8

Changed

  • 2026-11-30: REVIEW.md now says when a review target went over the 1 MiB total size cap and --allow-large-target
    let it through (CORE-617).
    Since 7.31.0 the assignment record carries
    total_size_override: {target_bytes, cap_bytes} for such a run, and stderr says so, but
    pharn/floor/render-review.mjs never read the field. A person reading only REVIEW.md could not tell the target was
    over the cap, or by how much.
    • With the field present and well formed, the ## Assignment summary gains one line after the Target: line: the
      target's bytes, the cap's bytes, and that --allow-large-target let it through.
    • With no field, REVIEW.md is byte-identical to before. A test pins the SHA-256 of two renders taken from the renderer
      as it stood before the change (unchanged since 7.31.0).
    • With a malformed field, the line says the field is not in the shape the emitter writes and that I10 refuses the
      record. It shows no number, key or value from the field, and repairs nothing (a numeric string is not read as a
      number).
    • The shape test exists once: pharn/floor/check-review-assignments.mjs exports I10's test as
      totalSizeOverrideProblem(), checkRecord calls it with its reasons unchanged, and the renderer imports it. So
      the renderer now loads the checker and, through it, the emitter module and node:child_process; it calls no
      process-spawning function. The figures are shown only when the shape test passes, and the renderer prints them as
      digits.
    • CORE-596's review raised this, and its plan deferred it as a follow-up. Bound: the line shows what the record says.
      It does not re-measure the target, and it cannot tell who passed the flag.

v7.32.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 13:55
a3e080f

Added

  • 2026-11-30: /pharn-regress makes its base checkout with git clone --shared when git worktree add fails, so a
    regress run under Claude Code's Bash sandbox can still reach a base-and-head verdict (CORE-616).
    The sandbox refuses
    .git/worktrees/ in the project's repository, and no allowWrite entry lifts it
    (.dev/measurements/sandbox-probe-2026-11-29.md, sessions G and G2). So the stage's git worktree add failed and the
    stage stopped unusable git-failed with no verdict. That was predicted from probes; no loop got as far as regress.
    • pharn/floor/stage-regress.mjs tries git worktree add first, as before. If it exits non-zero, the stage clears
      what it left, makes a fresh base directory in the temp root, and runs pharn/floor/base-worktree.mjs
      cloneBaseCheckout: git clone --shared --no-checkout of the repository's top level, then a detached checkout of
      the base commit. A local clone writes only its destination, so nothing lands under the project's .git; that is
      git's behaviour, and the tests check it (advisory). The clone's git calls run without GIT_DIR, GIT_WORK_TREE,
      GIT_INDEX_FILE and the other repository-selecting variables. A stage started from a git hook inherits them, and
      with them the checkout rewrote the project's HEAD. The branch reads the exit status and never parses git's text, so
      the clone also covers an add that failed for another reason. If the clone fails too, the stage stops git-failed
      as before, and the detail names both failures.
    • When add succeeds, no output byte changes. The report gains base_checkout: "clone" only when the clone path
      ran, after base_install, and REGRESSION.md gains one fixed line. The progress record's optional baseCheckout
      tells --resume and cleanup which method made the checkout. A record written before 7.32.0 lacks it and is read as
      a worktree, so it still resumes. Cleanup removes a clone's directory, because a clone has no registration.
    • Both methods put the base commit's top-level tree at the checkout's root, where the base gates run. A clone does not
      carry the repository's own .git/config, .git/info/attributes or info/exclude. It runs the user's
      init.templateDir hooks instead of the project's post-checkout hook. Submodules are not initialized either way.
      LFS content and shallow sources are unmeasured. Under the sandbox, a base commit holding a .gitmodules file still
      fails its checkout. pharn/pharn-contracts/regression-report.md documents the key and these bounds.
    • Measured on a temp copy of this repository (4,329 files, 3 runs): git worktree add took 1,236–1,690 ms, and clone
      plus checkout took 1,327–1,618 ms. The tests simulate the sandbox's refusal with an unwritable .git/worktrees,
      which produces the same git error. That a clone succeeds under the real sandbox is inferred from the record (a
      scratch repository used under the temp dir) and has not been re-measured. Reusing the entry gates' base evidence
      (6.49.0) was not chosen as the fix, because a miss, or a standalone regress, still needs a checkout.
  • 2026-11-30: A measurement record of PHARN 7.29.0 under Claude Code's own Bash sandbox in strict mode (CORE-586):
    no-go for shipping a sandbox profile yet, plus the settings block a shipped profile would use.
    Measured on macOS
    27.0.1 with Claude Code 2.1.332, n = 1 per configuration (.dev/measurements/sandbox-probe-2026-11-29.md; kit,
    runbook and evidence under .dev/features/sandbox-probe/). In project settings, a denyWrite entry refused Bash
    writes to pharn/floor/, two of the trusted docs, memory-bank canon and pharn/spec-template.md, and the .claude/
    control surface, .git/hooks and .git/config were refused with no entry. With allowUnsandboxedCommands: false the
    unsandboxed retry was ignored. credentials unset the gate environment's credential names, and check-run-isolation
    still reported HOST. Three full /pharn-loop runs (main checkout and linked worktree) all stopped at the entry
    gates. One stop was caused by the sandbox: local test servers and tsx could not bind sockets. Two breaks have no
    settings fix: ps cannot run, so entry-gates.mjs --abort leaves the gate runner running, and git worktree add in
    the project's repository is refused. Regress, build, verify and the loop commit were not reached. The sandbox covers
    Bash only; the record credits it with no Write-tool, hook or MCP control. No product-surface byte changed.

v7.31.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 08:53
7047320

Added

  • 2026-11-29: /pharn-review refuses a review target whose files total more than 1 MiB unless the run passes
    --allow-large-target, and the assignment record carries that override (CORE-596).
    Until now nothing bounded the
    review set as a whole. render-review-assignments.mjs skipped a discovered file over 512 KiB, but a file named with
    --target was kept as named, and every scanner-less lens group (hallucinated-api, input-validation,
    race-condition, trust-fence) got the whole resolved target, so one large target went into each of those contexts
    in full and nobody had chosen that. This changes standalone /pharn-review only, because /pharn-loop does not run
    it.
    • pharn/floor/render-review-assignments.mjs adds the sizes of the resolved target's files: named files count,
      skipped paths do not, and the merge-base-diff branch is capped too. Over MAX_TARGET_TOTAL_BYTES (1 MiB, strictly
      greater) it exits 1 and writes nothing. The refusal gives the byte total and the cap, says to narrow the target or
      ask the human, and names the flag. With --allow-large-target the target is assigned as before, the record gains
      total_size_override: {target_bytes, cap_bytes}, and stderr gets one line. The field appears only when the flag
      let an over-cap target through, so a target at or under the cap gets the same record, byte for byte, with or
      without the flag.
    • Why 1 MiB: at the ~4 characters per token that pharn/LIMITS.md §1c uses as an estimate, 1 MiB is about 262k
      tokens, which is more than a 200k-token context window. It is also twice the per-file cap. Measured cost: 62 of
      this repository's last 300 first-parent commits would have needed the flag or a narrower target, and 3 would have
      needed it at 2 MiB.
    • Over the cap the emitter refuses rather than recording a partial target. Dropping files to fit would mean choosing
      them by a rule that has nothing to do with the code, and the record would then present what was left as the
      target. The cap is a size rule, not a judgment that any file holds nothing worth reviewing. It limits what is
      assigned, never what a lens reads.
    • pharn/floor/check-review-assignments.mjs adds I10: when total_size_override is present, it must hold exactly
      two positive safe integers, with target_bytes > cap_bytes. A missing field is valid, so a deleted field looks
      the same as a run under the cap, and the sizes are not re-read from disk.
    • /pharn-review Step 1b now lists three refusals. On the size refusal it asks the human whether to narrow the
      target or review all of it, and passes --allow-large-target only when the human explicitly answers to review the
      whole target. That last part is advisory, because the flag cannot tell who chose it.
    • pharn/LIMITS.md §3a says the same. A person applied that edit before the build anchored, because the trusted
      docs are human-only.

v7.30.1

Choose a tag to compare

@github-actions github-actions released this 30 Nov 08:36
98f2147

Fixed

  • 2026-11-30: pharn/LIMITS.md §6 and §7 now say what pharn status reports from pharn-cli 0.23.0 on: a project
    settings file that sets "disableAllHooks": true, and a write guard wired without "onFailure": "block"
    (CORE-594).
    §6 had said that in an install nothing PHARN ships checks either settings file. It now says that
    pharn status prints a HOOKS OFF line for each project file whose disableAllHooks is exactly true, that
    pharn status --strict exits 1 on it, and gives the bounds. It reads only .claude/settings.json and
    .claude/settings.local.json, never ~/.claude/settings.json. It judges each file's own value, not the merged
    one, and reads neither file under --no-drift. It is a report, not a guard, so a key added after the run is not
    seen. §7's onFailure bullet gains the matching FAIL-OPEN report, for a hook the shipped settings.json wires
    with "onFailure": "block" and a project file wires without it, with the same bounds. The Stop hook is never
    reported. The text describes a session with no sandbox profile, since PHARN ships none. A human applied the edit
    from .dev/features/hook-wiring-flags/proposed/, after rebasing the patch onto 7.29.1 (hunk headers only) and
    re-reading its claims at pharn-cli v0.23.0. No guarantee is added to either section.

v7.30.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 08:13
87563af

Added

  • 2026-11-29: A cap on the total size of the always-loaded instruction set (CORE-595). Before this, the
    instruction-growth gate limited only how many bytes one change added to the modelled set (CLAUDE.md, its @
    imports, .claude/rules without paths:). Changes that each stayed under that budget could still pile up: this
    repository's own CLAUDE.md went from 97,252 bytes to 186,861 bytes in twelve days in 2026-09/10. Every fresh stage
    context pays for this set again (pharn/LIMITS.md §3g).
    • budget.instructionTotalBytes in pharn.config.json sets the cap. It is read from the base commit's copy, like
      budget.instructionGrowthBytes, so a change cannot raise its own cap. With no key there is no cap, so an
      existing install behaves exactly as before. A value that is not a non-negative integer is threshold-malformed
      (exit 2).
    • check-instruction-files.mjs --growth judges both budgets in one verdict, so /pharn-verify's instruction-growth
      gate fails when the set's total is over the cap even if the change itself is small. The output now always carries
      total_bytes, total_cap, total_cap_source (config or unset) and exceeded (growth, total, both, or
      neither).
    • Stated limits (pharn/LIMITS.md §3e, edited by a human in this release): the verdict is over the checker's model of
      the set, not over what Claude Code loads. A set already over its cap fails every verify until a person raises the
      cap or shrinks the set on the base branch; /pharn-loop does not check the cap at entry. While a cap is set, a set
      that reaches a git submodule is submodule-unmeasured (exit 2), unless the bytes the checker can read are already
      over the cap. If pharn update drops the key, the cap is off.
    • This repository sets the cap to 40,960 bytes (CLAUDE.md is 31,456 bytes). CI's existing instruction-growth step
      applies it to pull requests opened after this one merges.
  • 2026-11-29: A proposed pharn/LIMITS.md patch for what pharn status reports from pharn-cli 0.23.0 on: a
    project settings file that sets "disableAllHooks": true, and a write guard wired without "onFailure": "block"
    (CORE-594).
    .dev/features/hook-wiring-flags/proposed/ holds the patch and its APPLY.md, which maps each new
    claim to the pharn-cli source line behind it. The patch rewrites §6's "nothing PHARN ships checks either file" and
    adds a passage to §7's onFailure bullet, stating the report's bounds there. Nothing is applied: pharn-cli 0.23.0
    is not published yet, and APPLY.md says to wait for it. No shipped file changes, so SKILLS_VERSION stays
    7.29.1.

v7.29.1

Choose a tag to compare

@github-actions github-actions released this 30 Nov 06:53
c998002

Fixed

  • 2026-11-29: pharn/LIMITS.md §3g now gives the measured size of a pharn-stage first request (CORE-598). It
    had said that how much smaller a pharn-stage first request is than a general-purpose one "is not measured in
    this document". The 2026-11-23 benchmark measured it: 33,011 tokens against 60,207 (the plan and grill agents),
    with the same project instruction files and memory index in both, so the first request is 45.2% smaller.
    §3g now cites .dev/measurements/stage-agent-benchmark-2026-11-23.md §4 and states the record's bounds: n = 1
    per arm, one project, a one-line doc-comment feature, Claude Code 2.1.328. A human applied the edit from
    .dev/features/limits-stage-prefix-pointer/proposed/. The figure covers the first request only. It is not a
    guarantee and gives no mean or spread.

Added

  • 2026-11-29: A measurement record of the orchestrator's share in the green 7.22.0 /pharn-loop run, set against
    CORE-113's reopening threshold (CORE-597).
    .dev/measurements/orchestrator-share-7.22.0-2026-11-29.md re-derives
    two readings with the baseline's weighted-cost formula. Run 2's cost.json (the run window) gives 26.95% (36 of 138
    requests), and the whole session's transcript gives 36.48% (46 of 148). The reopening condition names cost.json, so
    this run does not meet condition 1 (27.7%), at n = 1. The record does not reopen CORE-113. The ticket's whole-session
    range, 31.0%–33.4%, is not a bound: it weighted every cache write alike, while the orchestrator wrote only 1-hour
    cache and the stage agents only 5-minute cache. The commands live in
    .dev/features/orchestrator-share-record/share.mjs. Build apparatus only: no product byte, no SKILLS_VERSION bump.