@phi-code-admin/phi-code 0.93.0 → 0.93.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.93.1] - 2026-07-12
4
+
5
+ ### Fixed
6
+
7
+ - /fix on PROSE input now has a real oracle: the single shot is instructed to
8
+ WRITE a literal reproduction (from the issue's exact snippets) and declare
9
+ it on a REPRO-CMD: handoff line; the driver oracle re-runs it. Without this,
10
+ prose inputs (e.g. SWE-bench problem statements) finished UNVERIFIED with
11
+ nothing to check. +2 tests.
12
+
3
13
  ## [0.93.0] - 2026-07-12
4
14
 
5
15
  ### Added — the escalation architecture the n=13 measurement demanded
@@ -315,10 +315,11 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
315
315
  // untouched; "debug"/"build"/"fix" are driven by the separate linear generic
316
316
  // driver so /plan's fragile review-fix + "/5" logic is never engaged for them.
317
317
  let orchestrationMode: "plan" | "debug" | "build" | "fix" = "plan";
318
- // /fix escalation state: the failing state the command started from, and
319
- // whether the driver-level oracle already ran (it must run exactly once,
320
- // after the single-shot phase, before the run can finish).
321
- let fixContext: { state: FailingState; oracleRan: boolean } | null = null;
318
+ // /fix escalation state: the failing state the command started from, whether
319
+ // the driver-level oracle already ran (it must run exactly once, after the
320
+ // single-shot phase), and the reproduction the shot itself declared via its
321
+ // REPRO-CMD handoff line (prose inputs have no runnable check otherwise).
322
+ let fixContext: { state: FailingState; oracleRan: boolean; reproFromShot?: string } | null = null;
322
323
  // /debug --candidates N state: each FIX candidate's captured patch, the
323
324
  // reproduction command used for deterministic arbitration (from the input or
324
325
  // the REPRODUCE handoff's REPRO-CMD line), and whether arbitration ran.
@@ -1359,7 +1360,8 @@ Tag the note with relevant keywords for vector search.
1359
1360
  fixContext.oracleRan = true;
1360
1361
  const cwd = ctx.cwd || process.cwd();
1361
1362
  const sandbox = getSessionSandbox(cwd);
1362
- const reproCmd = fixContext.state.failingTest?.trim() || fixContext.state.reproCommand?.trim();
1363
+ const reproCmd =
1364
+ fixContext.state.failingTest?.trim() || fixContext.state.reproCommand?.trim() || fixContext.reproFromShot;
1363
1365
  const suiteCmd = sandbox.recipe.test?.trim();
1364
1366
 
1365
1367
  if (!sandbox.available() && (reproCmd || suiteCmd)) {
@@ -1643,6 +1645,15 @@ Tag the note with relevant keywords for vector search.
1643
1645
  // handoff line (used later for deterministic arbitration);
1644
1646
  // - after each FIX candidate: capture its patch (git diff of tracked
1645
1647
  // files) and RESET the tree so the next candidate starts clean.
1648
+ // /fix: the single shot may have WRITTEN its own reproduction (prose
1649
+ // inputs) and declared it via REPRO-CMD — the driver oracle re-runs it.
1650
+ if (fixContext && currentPhase?.key === "shot" && !fixContext.reproFromShot) {
1651
+ fixContext.reproFromShot = parseReproCmd(outcome.handoff);
1652
+ if (fixContext.reproFromShot) {
1653
+ ctx.ui.notify(`\n🧷 Shot-declared reproduction registered: \`${fixContext.reproFromShot}\``, "info");
1654
+ }
1655
+ }
1656
+
1646
1657
  if (candidateContext && currentPhase) {
1647
1658
  const cwd = ctx.cwd || process.cwd();
1648
1659
  if (currentPhase.key === "reproduce" && !candidateContext.reproCmd) {
@@ -129,9 +129,13 @@ ${failing}
129
129
  **Do exactly this:**
130
130
  1. Read the relevant code and locate the root cause.
131
131
  2. Make the smallest change that addresses it. Do NOT edit tests. Every added guard/branch is a liability.
132
- 3. You MAY use \`sandbox_run\` to check your work (the project's real environment)recommended when a command is available.
133
- 4. After your change, the orchestrator will run the reproduction and the project suite in the sandbox itself: your work is judged by those REAL runs, not by your confidence. If they are red, a full diagnostic pipeline takes over from your change.
134
- 5. **Last action:** call \`phase_result\` with \`verdict: PASS\` and a one-line handoff describing what you changed and why.${DEBUG_RULES}`;
132
+ 3. If NO runnable check was provided above, WRITE a minimal reproduction script derived **literally from the issue** (copy its exact snippets/expected values not your paraphrase) into an untracked file (e.g. \`repro_issue.py\`), and confirm with \`sandbox_run\` that it fails before your change / passes after.
133
+ 4. You MAY use \`sandbox_run\` to check your work at any point (the project's real environment).
134
+ 5. After your change, the orchestrator re-runs the reproduction (and the suite when known) in the sandbox itself: your work is judged by those REAL runs, not by your confidence. If they are red, a full diagnostic pipeline takes over from your change.
135
+ 6. **Last action:** call \`phase_result\` with \`verdict: PASS\` and a handoff describing what you changed — and, when you wrote a reproduction, its exact command on a machine-readable line:
136
+ \`\`\`
137
+ REPRO-CMD: <the exact command, e.g. python repro_issue.py>
138
+ \`\`\`${DEBUG_RULES}`;
135
139
  }
136
140
 
137
141
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phi-code-admin/phi-code",
3
- "version": "0.93.0",
3
+ "version": "0.93.1",
4
4
  "description": "Coding agent CLI with persistent memory, sub-agents, intelligent routing, and orchestration",
5
5
  "type": "module",
6
6
  "piConfig": {