Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d5c01f8
feat: implement issue #1811 — per-run create-issue scratch dir + clea…
github-actions[bot] Aug 25, 2026
11ecad9
feat: implement issue #1811 — thread per-run create-issue dir through…
github-actions[bot] Aug 25, 2026
a1ef742
feat: implement issue #1811 — relocate create-issue scratch paths in …
github-actions[bot] Aug 25, 2026
4c5065f
feat: implement issue #1811 — add cleanup-create-issue-run.sh tests +…
github-actions[bot] Aug 25, 2026
08afba4
chore: add changeset for issue #1811 (create-issue per-run scratch)
github-actions[bot] Aug 25, 2026
a49c173
refactor: address /simplify findings for issue #1811
github-actions[bot] Aug 25, 2026
2aa2d30
fix: address review findings (iteration 1) for issue #1811
github-actions[bot] Aug 25, 2026
3766e6e
fix: correct stale create-issue extension derivation path for issue #…
github-actions[bot] Aug 25, 2026
7fb6454
fix: address fix-delta gate finding (iteration 1) for issue #1811
github-actions[bot] Aug 25, 2026
146eb4e
fix: address review findings (iteration 2, reaper) for issue #1811
github-actions[bot] Aug 25, 2026
3aec51d
fix: relocate issue-audit-state test module to per-run layout for iss…
github-actions[bot] Aug 25, 2026
e2cfdbe
fix: update run.sh draft-path pin to per-run layout for issue #1811
github-actions[bot] Aug 25, 2026
5a69135
test: address advisory review suggestions for issue #1811
github-actions[bot] Aug 25, 2026
65beb89
docs: reconcile create-issue lifecycle docs to per-run scratch layout…
github-actions[bot] Aug 25, 2026
04e0048
docs: reconcile cloud-allowlist create-issue emit-body path for issue…
github-actions[bot] Aug 25, 2026
8b4e74c
fix: deepen create-issue bootstrap draft-write mkdir for issue #1811
github-actions[bot] Aug 25, 2026
8b64184
Merge remote-tracking branch 'origin/main' into issue-1811-create-iss…
github-actions[bot] Aug 25, 2026
31e78b8
fix: relocate pin-corpus adjudication key for the create-issue draft-…
github-actions[bot] Aug 25, 2026
d26700b
Merge remote-tracking branch 'origin/main' into issue-1811-create-iss…
github-actions[bot] Aug 25, 2026
5cb3622
fix: authorize create-issue draft-path pin adjudication delta (#1811)
github-actions[bot] Aug 25, 2026
49efe88
test: declare structural-pin-ok for relocated create-issue draft-path…
github-actions[bot] Aug 25, 2026
a9efc1d
Merge remote-tracking branch 'origin/main' into issue-1811-create-iss…
github-actions[bot] Aug 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/issue-1811-create-issue-per-run-scratch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: patch
type: Changed
---

- **create-issue now namespaces its scratch under `.prflow/tmp/create-issue/<slug>/` and reaps it on success.** Every run artifact (drafts, staged history, audit files, audit state, emitted body, fetched copies, derivation artifact) is written into a per-run sub-directory instead of as a flat file directly under `.prflow/tmp/`, and a run that creates its issue removes its own run directory as its final step (keyed to the recorded slug — never a pattern or age sweep, so concurrent runs in sibling worktrees are untouched); a run that ends any other way leaves the directory in place as its diagnostic record. Pre-existing flat `issue-*` files are left untouched. (#1957)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
adjudication_key base_state current_state
literal:84e2059bc4402d9d5fe06f4c4e9e73174ef6670de3a64c8bdc32a301510559c5 "[""boundary"",""maintainer adjudication: create-issue EH: external helper, portable anchor, root binding, path display, or label outcome contract: create-issue displays the draft at the bound-root ABSOLUTE path""]" null
literal:a5220bed280a1b23b4205a2e4bfc0dff380971f2156019415fd39519765ad2d3 null "[""boundary"",""maintainer adjudication: create-issue EH: external helper, portable anchor, root binding, path display, or label outcome contract: create-issue displays the draft at the bound-root ABSOLUTE path""]"
2 changes: 1 addition & 1 deletion .prflow/prompt-extensions/create-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ yet.

**Produce the map before any mechanism prose exists** — not alongside it, and not to justify a design
you have already chosen. Write an **Interaction-surface map** block into this run's derivation
artifact (`.prflow/tmp/issue-derivation-<slug>.md`, which the Step 2 gate already requires; in a
artifact (`.prflow/tmp/create-issue/<slug>/issue-derivation-<slug>.md`, which the Step 2 gate already requires; in a
read-only sandbox it goes in the same visible chat block that stands in for that file). The block has
four parts, in this order. Every entry is a **`Verified:` bullet quoting the sentence from the file
verbatim, with its location**:
Expand Down
10 changes: 5 additions & 5 deletions docs/internal/DEVFLOW_SYSTEM_OVERVIEW.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/internal/cloud-allowlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ pattern alone under-reports this class by construction, which is why the rows ab
population rather than pinning a number to it.

**A fourth class evades them too: a target prefixed by a rendered PLACEHOLDER.**
`> "<main-root>/.prflow/tmp/issue-body-<slug>.md"` in `create-issue/references/issue-template.md`
`> "<main-root>/.prflow/tmp/create-issue/<slug>/issue-body-<slug>.md"` in `create-issue/references/issue-template.md`
is a real redirect into the scratch tree, but no pattern anchored at `.prflow/tmp` sees it, because
the literal begins with `<main-root>/`. Enumerate this population by resolving each redirect
token's target and testing for `.prflow/tmp` anywhere within it — never by anchoring the pattern at
Expand All @@ -1047,7 +1047,7 @@ the start of the target.
| `skills/retrospective-weekly/SKILL.md` | mixed stdout, append and stderr redirects | **local only** — no workflow dispatches this command | **left unchanged** |
| `skills/review/phases/phase-3-agents.md` | dirty-tree snapshot/restore fences, enumerated by a complete redirect-operator search of the fence: 2 × stdout capture to a defaulted-expansion target (`> "${GIT_SNAP_BEFORE:-…}"` and the `…AFTER…` equivalent), 4 × `printf … >>` append inside a `while read` loop (literal target, expanded `"$rec"`/`"${rec:3}"` in argument position), 2 × input redirect to a defaulted-expansion target (`done < "${GIT_SNAP_BEFORE:-…}"`, `done < "${GIT_SNAP_AFTER:-…}"`), 3 × input redirect to a literal target (2 × `tr '\0' ' ' < ".prflow/tmp/…"`, 1 × `done < ".prflow/tmp/…"`), 4 × literal-target stdout write with no expansion (the `printf '%s\n' disabled > ".prflow/tmp/review-dirty-tree-disabled"` sentinel, and the 3 `printf '%s' '' > ".prflow/tmp/review-dirty-tree-{before,changed,renamed}-paths"` scratch-init writes guarded on exit status) | cloud | **Recorded — not rewritten (issue #1734).** Cause 1 (`simple_expansion`) dominates; the input-redirect sites and the 4 literal-target stdout writes are newly enumerated. See the per-occurrence adjudication below. |
| `skills/implement/phases/phase-3-fix-loop.md` | 2 × `--persist` stderr capture to a `$(mktemp)` target — `2>"$PERSIST_ERR"` and `2>>"$PERSIST_ERR"` (the second an append) — each statement additionally led by the unexpanded `${CLAUDE_SKILL_DIR:-…}` anchor | cloud (`/prflow:implement`) | **Recorded — not rewritten (issue #1734).** Cause 2 (the `/tmp` target) **and** the denied anchor leading token. See the per-occurrence adjudication below. |
| `skills/create-issue/references/issue-template.md` | 1 × stdout redirect to the placeholder-prefixed target `"<main-root>/.prflow/tmp/issue-body-<slug>.md"` | **local only** — no workflow dispatches `/prflow:create-issue` | **left unchanged** |
| `skills/create-issue/references/issue-template.md` | 1 × stdout redirect to the placeholder-prefixed target `"<main-root>/.prflow/tmp/create-issue/<slug>/issue-body-<slug>.md"` | **local only** — no workflow dispatches `/prflow:create-issue` | **left unchanged** |

#### Per-occurrence adjudication of the three deferred populations (issue #1734)

Expand Down
8 changes: 4 additions & 4 deletions docs/internal/create-issue-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ resident copy. Each appended-content class is classified below.

| Class | Canonical durable copy that already holds it | Safely removable here? |
| --- | --- | --- |
| **Re-emission (re-quotation) of an already-produced large block** in the orchestrator's own output — an already-produced Step 1 findings block, an already-produced summary | Step 1 findings: the `.prflow/tmp/issue-step1-<slug>.md` artifact; finding-ledger data: the `issue-audit-state-<slug>.json` field reachable via `query-findings`; the Step 3.5 steelman summary: the `## Steelman record` section of `.prflow/tmp/issue-derivation-<slug>.md` | **Yes** — removed (see below). Its content is already resident from an earlier append; removing the re-quote touches neither compaction recovery nor a mutable file, and needs no new mechanism. |
| **Re-emission (re-quotation) of an already-produced large block** in the orchestrator's own output — an already-produced Step 1 findings block, an already-produced summary | Step 1 findings: the `.prflow/tmp/create-issue/<slug>/issue-step1-<slug>.md` artifact; finding-ledger data: the `issue-audit-state-<slug>.json` field reachable via `query-findings`; the Step 3.5 steelman summary: the `## Steelman record` section of `.prflow/tmp/create-issue/<slug>/issue-derivation-<slug>.md` | **Yes** — removed (see below). Its content is already resident from an earlier append; removing the re-quote touches neither compaction recovery nor a mutable file, and needs no new mechanism. |
| **Reference-body re-Read on step re-entry** (a large `references/*.md` re-Read "on every entry into this step") | The reference file on disk | **No — deferred.** It is *compaction insurance*: on a smaller-context consumer model a compaction evicts the body and the re-Read is the recovery. A static instruction cannot tell a compacting run from a non-compacting one, so safe removal needs an in-run compaction-detection signal this issue does not build. Filed as a follow-up. |

### Authoritative (in-thread presence is load-bearing — must NOT be removed)
Expand All @@ -180,11 +180,11 @@ rather than re-quoting it**. The edited sites are:

- `skills/create-issue/SKILL.md` — Step 1's evidence-artifact instruction and Step 3's
drafting rule: the Step 1 findings stay resident and durably held in
`.prflow/tmp/issue-step1-<slug>.md`; Step 3 references them by pointer and does not
`.prflow/tmp/create-issue/<slug>/issue-step1-<slug>.md`; Step 3 references them by pointer and does not
re-emit the findings block into its drafting output.
- `skills/create-issue/references/step-3-6-audit.md` — a runtime-context discipline note
beside the read-back mandate: consult the `query-findings` read-back and the
`.prflow/tmp/issue-audit-<slug>.md` artifact by pointer; do not re-emit an
`.prflow/tmp/create-issue/<slug>/issue-audit-<slug>.md` artifact by pointer; do not re-emit an
already-produced findings block into the orchestrator's own reasoning output. The
user-facing surfaces (findings quoted verbatim for the user, rendered adjudication
records) are explicitly exempt — they are authoritative decision inputs.
Expand All @@ -206,7 +206,7 @@ weakened**:
1. **Code-reading obligation (confirmed).** Each removed re-emission's content stays
resident and reachable from its named durable copy at the point of use:
- Step 1 findings: `skills/create-issue/SKILL.md` Step 1 states the orchestrator
writes the reconciled evidence to `.prflow/tmp/issue-step1-<slug>.md` on **both**
writes the reconciled evidence to `.prflow/tmp/create-issue/<slug>/issue-step1-<slug>.md` on **both**
arms before Step 1 returns (the write-on-every-path contract), so Step 3 always has
the durable copy to reference. Confirmed by reading that Step 1 producer.
- Finding-ledger data: `scripts/issue-audit-state.py` remains the ledger owner and
Expand Down
5 changes: 5 additions & 0 deletions lib/test/modules/coverage-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@
"note": "",
"owner": "unmodularized"
},
"scripts/cleanup-create-issue-run.sh": {
"focused_test": "lib/test/test_python_scripts.py",
"note": "issue #1811 per-run create-issue scratch reaper; keyed to the recorded slug (never a pattern/age sweep); behavioral cases (valid-slug reap, foreign-pointer skip, empty-handle non-destructive, unsafe-slug traversal refusal, multi-root, idempotent absent-dir) driven via subprocess by the #1811 block in lib/test/test_python_scripts.py",
"owner": "unmodularized"
},
"scripts/collect-staged-telemetry.sh": {
"note": "",
"owner": "unmodularized"
Expand Down
Loading
Loading