Skip to content

feat(floor): /pharn-verify reuses equivalent REGRESS/HEAD gate executions within one delivery run (6.34.0) - #298

Merged
PrzemekGalarowicz merged 1 commit into
mainfrom
regress-head-reuse
Sep 28, 2026
Merged

PrzemekGalarowicz merged 1 commit into
mainfrom
regress-head-reuse

Conversation

@PrzemekGalarowicz

Copy link
Copy Markdown
Contributor

Summary

Inside one /pharn-loop or /pharn-ship run, /pharn-verify now records a gate's result from the completed
execution /pharn-regress's HEAD side already made of it — without spawning the gate again — when tested code proves
every bound input is equal. Every other gate runs exactly as before; missing or unusable reuse evidence is never a
failure. SKILLS_VERSION 6.33.0 → 6.34.0 (minor). MIN_CLI stays 0.5.0.

  • Execution identity (pharn/floor/gate-reuse-core.mjs, pure): sha256 over command (shell/argv), ordered files,
    cwd realpath, --timeout-ms, git HEAD, the PHARN-added env var name, and the tree fingerprint (algo + fp_before).
    Recorded on every run as the additive runs[].identity_sha256.
  • Eligible: completed process exit 0..125 (a completed RED is reused like a green), not timed out, did not move the
    tree, no regular results file. Never reused: AC level gates (test, test:e2e, e2e), style gates (they read
    fingerprint-excluded REGRESSION.md/VERIFY.md), reconcile. In practice: typecheck, type-check, build.
  • Source binding (pharn/floor/head-reuse-offer.mjs): regress publishes a git-dir offer bound to the HEAD stamp's
    bytes and the open run marker, and discards it at its fresh start; a stamp planted under .pharn/ (e.g. a --quick
    build) is never offered.
  • Truthful evidence: a reused entry is ran: false, reason: "reused", with a reused block naming the source
    execution; logs are copied only after hash verification. verify-report.json gains the additive, advisory
    gate_reuse block; VERIFY.md says "reused, not re-executed". Verdict, AC gate, completeness, check-verify,
    check-regress, check-loop-fresh and drain/budget/resume are unchanged.

Measured (.dev/features/verify-head-gate-reuse/MEASUREMENT.md)

Fixture with test, lint, typecheck, build (1 s gates), 3 runs each:

verify processes total gate processes verify wall-clock
before (main) 4 12 ~4.8 s
after 2 (+2 reused) 10 ~2.5 s (−49%)

Regress unchanged; the offer decision costs ~17 ms. No token saving claimed.

Validation

  • /pharn-dev-regress: no-regressions (base 2cf0e85).
  • /pharn-dev-verify: PASS — test 4455/4455, validate, lint, format:check, lint:md, reconcile all 0.
  • Mandatory fresh-vs-reuse equivalence test, scenarios A–H through the real stage scripts with a spawn counter,
    per-component negative controls (unit and runner level, each mutation-checked), crash/resume, ★ HOOK test on the
    offer path, ★ WIRING with the committed command lines.
  • Independent grill and review (read-only Opus agents): no false-HIT path found; all findings fixed
    (GRILL.md, REVIEW.md).

For the maintainer (human-only)

  • LIMITS.md "/pharn-verify re-runs the project's own gates" is now partly stale — not edited (human-only).
  • A separate git dir under a temp root, in an installed project with no run open, is writable by the Write tool; this
    bounds both the new offer record and the 6.33.0 BASE record. Named, not fixed.
  • GATE 1 and the GATE-2 fixes were delegated model decisions (recorded in SHIP.md), not human approvals.

🤖 Generated with Claude Code

…ions within one delivery run (6.34.0)

Inside one /pharn-loop or /pharn-ship run, /pharn-verify records a gate's result from the completed
execution /pharn-regress's HEAD side already made of it, without spawning the gate again, when tested
code proves every bound input is equal (the execution identity: command, ordered files, cwd realpath,
--timeout-ms, git HEAD, the PHARN-added env var name, the tree fingerprint). Style gates, AC level gates
and reconcile are never reused. The source is offered only through a git-dir record regress publishes.
Reused entries are ran:false, reason:"reused", with provenance; every miss runs the gate as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 68069c36-d5b5-41f9-9e04-e0b7008498cc


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PrzemekGalarowicz
PrzemekGalarowicz merged commit 1f6e2d6 into main Sep 28, 2026
8 checks passed
@PrzemekGalarowicz
PrzemekGalarowicz deleted the regress-head-reuse branch September 28, 2026 17:58
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