specrails-core 5.1.0 → 5.2.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.
@@ -1,10 +1,11 @@
1
- import { closeSync, constants, cpSync, existsSync, linkSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, rmSync, unlinkSync, writeFileSync } from 'node:fs';
1
+ import { closeSync, existsSync, linkSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, rmSync, unlinkSync, writeFileSync } from 'node:fs';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import { realpathSync as requireRealpath } from 'node:fs';
4
4
  import os from 'node:os';
5
5
  import path from 'node:path';
6
6
  import { InstallerError } from './errors.js';
7
7
  import { isReservedPath, RESERVED_PATHS } from './paths.js';
8
+ import { restoreTree, snapshotTree } from './fs.js';
8
9
  function exists(file) {
9
10
  try {
10
11
  lstatSync(file);
@@ -139,17 +140,35 @@ function removeForRollback(target, relative) {
139
140
  }
140
141
  /** Snapshot only installer-owned surfaces; never follow links into a shared framework.
141
142
  * Backups survive a failed rollback and their location is reported for recovery.
143
+ *
144
+ * Snapshotting requires NO filesystem privilege: links are recorded by target
145
+ * rather than recreated (see `snapshotTree`), so a protected surface that is —
146
+ * or contains — a Windows junction no longer fails the install on an account
147
+ * without SeCreateSymbolicLinkPrivilege.
142
148
  */
143
149
  export async function withInstallRollback(paths, apply) {
144
150
  const backup = mkdtempSync(path.join(os.tmpdir(), 'specrails-update-backup-'));
145
- const snapshots = [...new Set(paths)].map((target, index) => ({ target, saved: path.join(backup, String(index)), present: exists(target) }));
151
+ const seen = new Set();
152
+ const snapshots = [];
153
+ for (const entry of paths) {
154
+ const target = typeof entry === 'string' ? entry : entry.path;
155
+ if (seen.has(target))
156
+ continue;
157
+ seen.add(target);
158
+ snapshots.push({
159
+ target,
160
+ saved: path.join(backup, String(snapshots.length)),
161
+ present: exists(target),
162
+ snapshotContents: typeof entry === 'string' ? true : entry.snapshotContents,
163
+ links: [],
164
+ });
165
+ }
146
166
  let retainBackup = false;
147
167
  try {
148
- // Snapshot destinations are new: keep traversal in JS to avoid Node 22's
149
- // native Unicode directory-copy defect on Windows (nodejs/node#61878).
150
- for (const row of snapshots)
151
- if (row.present)
152
- cpSync(row.target, row.saved, { recursive: true, dereference: false, verbatimSymlinks: true, filter: () => true, mode: constants.COPYFILE_FICLONE });
168
+ for (const row of snapshots) {
169
+ if (row.present && row.snapshotContents)
170
+ row.links = snapshotTree(row.target, row.saved);
171
+ }
153
172
  try {
154
173
  return await apply();
155
174
  }
@@ -157,16 +176,17 @@ export async function withInstallRollback(paths, apply) {
157
176
  const failures = [];
158
177
  for (const row of [...snapshots].reverse()) {
159
178
  try {
179
+ // A pre-existing surface we deliberately did not copy is left alone:
180
+ // there is no backup to put back, and removing it would destroy work
181
+ // the transaction never owned.
182
+ if (row.present && !row.snapshotContents)
183
+ continue;
160
184
  const relative = path.basename(row.target);
161
185
  removeForRollback(row.target, relative);
162
186
  if (row.present) {
163
187
  mkdirSync(path.dirname(row.target), { recursive: true });
164
- cpSync(row.saved, row.target, {
165
- recursive: true, dereference: false, verbatimSymlinks: true, mode: constants.COPYFILE_FICLONE,
166
- // Node 20 on Windows passes namespaced paths (\\?\) to
167
- // cpSync filters; newer releases may pass ordinary paths. Put
168
- // both operands in the same namespace before checking ownership.
169
- filter: (source) => !isReservedPath([relative, path.relative(path.toNamespacedPath(row.saved), path.toNamespacedPath(source)).split(path.sep).join('/')].filter(Boolean).join('/')),
188
+ restoreTree(row.saved, row.target, row.links, {
189
+ skip: (rel) => isReservedPath([relative, rel].filter(Boolean).join('/')),
170
190
  });
171
191
  }
172
192
  }
@@ -1 +1 @@
1
- {"version":3,"file":"install-transaction.js","sourceRoot":"","sources":["../../../src/installer/util/install-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SA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CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAA;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAA;IAAC,CAAC;AAC9E,CAAC"}
@@ -51,3 +51,46 @@ make paid model calls or claim identical behavior across every native CLI releas
51
51
 
52
52
  See [Core installation and update consistency](core-updates.md) for version
53
53
  selection, rollback and Desktop integration.
54
+
55
+
56
+ ## Acceptance evidence and completion
57
+
58
+
59
+ After development, normal review MUST write `stateDir/acceptance.json` and run
60
+ `acceptance --request <absolute-path>` before `phase --phase reviewer --status done`.
61
+ The request is `{criteria: [...], checks: [...], findings: [...]}`:
62
+ - Each criterion has `specId` (string), `criterionIndex` (zero-based), `requirement`
63
+ (exact frozen text), `status` (`met`, `exception`, `blocked`, `pending`) and a
64
+ nonempty `evidence` array of concrete code/test/capture references and observations.
65
+ Cover every frozen acceptance criterion once. If a spec has no explicit criteria,
66
+ use its complete frozen description (or title if empty) at index 0.
67
+ - An `exception` MUST include `{reason, impact, material, acceptedBy, approvalEvidence}`.
68
+ `acceptedBy` is `reviewer`, `user`, or `host`. Material scope changes require actual
69
+ user/host authorization; do not invent approval or label material changes minor.
70
+ Previously authorized decisions need no new confirmation. Unresolved requirements
71
+ remain `blocked` or `pending`, never `met` through a rewritten interpretation.
72
+ - Each check has `{name, status, required, evidence, scope, limitations}`; status is
73
+ `passed`, `failed`, or `unavailable`. Include required and supplementary checks from
74
+ the design. Record the original required classification; never downgrade a failed
75
+ check to make the gate pass. For benchmarks state what is measured and excluded:
76
+ a Node microbenchmark does not establish browser Canvas/GPU/frame performance.
77
+ - `findings` lists concrete review conclusions, risks and resolutions; use an empty
78
+ array only when no findings remain. Numeric confidence cannot replace this report.
79
+
80
+ The runtime binds this evidence to frozen scope, source and design. Missing/stale
81
+ acceptance or unresolved requirements/required checks block review and archive.
82
+ Accepted exceptions and supplementary failures produce `with-exceptions` validation.
83
+ Replacing the report requires review and archive authorization again; a green command
84
+ receipt alone is insufficient. Evidence references and approval attribution remain
85
+ reviewer assertions, not independently authenticated proof of human approval.
86
+
87
+ Keep operational completion notes, check requests and reports in `stateDir` from
88
+ start to finish. Run scoped checks for repairs and one final full verification after
89
+ all edits. Reuse that full receipt while runtime status says it is valid and its
90
+ commands cover required checks. New prose/phase handoffs alone do not warrant reruns.
91
+
92
+ End with ONE concise summary from runtime `status.completion`: implementation,
93
+ validation (including exceptions), archive, delivery, and evidence references.
94
+ Host-owned delivery stays `pending-host`; do not call uncommitted files "landed".
95
+ Report phase durations/attempts from `status.phases`; report per-phase cost only when
96
+ provider telemetry attributes it, otherwise unavailable. Do not invent cost splits.
@@ -259,12 +259,15 @@
259
259
  "status",
260
260
  "phase",
261
261
  "verify",
262
+ "acceptance",
262
263
  "archive-check",
263
264
  "preview",
264
265
  "apply-preview"
265
266
  ],
266
267
  "statePath": "<backlogRoot>/.specrails/pipeline/<runId>/state.json",
267
268
  "verification": "Successful argv-based commands captured by the runtime, bound to frozen scope, candidate files and relevant execution environment. Unknown or stale evidence cannot pass archive.",
268
- "hostOwnership": "Host worktrees are used directly; host git/backlog are not mutated by Core delivery."
269
+ "hostOwnership": "Host worktrees are used directly; host git/backlog are not mutated by Core delivery.",
270
+ "acceptance": "acceptance --request JSON records every exact frozen requirement, evidence, exception authority, check scope/limitations and findings. Required by reviewer done/archive-check; bound to scope, candidate and design.",
271
+ "completion": "status.completion separates implementation, validation (verified|with-exceptions|pending|blocked), archive and delivery (pending-host|complete|pending); status.phases includes observed durationMs and attempts."
269
272
  }
270
273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specrails-core",
3
- "version": "5.1.0",
3
+ "version": "5.2.1",
4
4
  "description": "Provider-independent AI agent workflow system for Claude Code, Codex, Gemini CLI, and Kimi Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -313,3 +313,12 @@ This is non-negotiable for code-navigation work: plugin authors choose tools bec
313
313
  - Is this a symbol/reference/definition lookup? → MCP tool, not `Grep`/`Read`.
314
314
  - Am I about to read a file just to edit one function? → MCP tool, not `Read` + `Edit`.
315
315
  - No documented MCP tool fits the current need? → built-in, document why in your reasoning.
316
+
317
+
318
+ ## Acceptance and measurement plan
319
+
320
+ Map frozen requirements to behavioral evidence before implementation. Declare required
321
+ and supplementary checks and their measurement scope/limitations. Visual work needs
322
+ real rendered evidence at supported viewports and peak effect states; browser frame
323
+ performance needs browser measurements. Flag contradictory requirements and material
324
+ scope interpretations explicitly; do not weaken frozen acceptance text in the design.
@@ -272,3 +272,12 @@ Guidelines:
272
272
  ## MEMORY.md
273
273
 
274
274
  Your MEMORY.md is currently empty.
275
+
276
+
277
+ ## Verification evidence handoff
278
+
279
+ Keep operational notes and check requests under runtime `stateDir`, outside the design
280
+ artifacts. Supply evidence per frozen requirement and report failed/unavailable checks.
281
+ Declare benchmark scope and exclusions; Node timings do not prove browser frame time.
282
+ Use scoped checks during repairs and one final full receipt, reused while valid.
283
+ Return a concise handoff; the coordinator owns the single final run summary.
@@ -369,3 +369,14 @@ This is non-negotiable for code-navigation work: plugin authors choose tools bec
369
369
  - Is this a symbol/reference/definition lookup? → MCP tool, not `Grep`/`Read`.
370
370
  - Am I about to read a file just to edit one function? → MCP tool, not `Read` + `Edit`.
371
371
  - No documented MCP tool fits the current need? → built-in, document why in your reasoning.
372
+
373
+
374
+ ## Structured acceptance handoff
375
+
376
+ Follow the executable pipeline acceptance contract. Return a `stateDir/acceptance.json`
377
+ request covering every frozen requirement with evidence, explicit exceptions, required
378
+ and supplementary checks (including benchmark scope/limitations), and concrete findings.
379
+ Have the coordinator record it with `acceptance --request` before reviewer done and
380
+ archive-check. Inspect visual evidence at supported viewports and extreme states for
381
+ visual changes. A confidence score or checked tasks cannot substitute for acceptance.
382
+ Do not self-authorize material scope changes; cite actual existing user/host decisions.
@@ -312,3 +312,12 @@ state is corrupt, etc.), instead reply with:
312
312
 
313
313
  and end your turn. Do not invent fake plans or empty OpenSpec
314
314
  packages to keep the pipeline moving.
315
+
316
+
317
+ ## Acceptance and measurement plan
318
+
319
+ Map frozen requirements to behavioral evidence before implementation. Declare required
320
+ and supplementary checks and their measurement scope/limitations. Visual work needs
321
+ real rendered evidence at supported viewports and peak effect states; browser frame
322
+ performance needs browser measurements. Flag contradictory requirements and material
323
+ scope interpretations explicitly; do not weaken frozen acceptance text in the design.
@@ -205,3 +205,12 @@ no executable behaviour to test), reply with:
205
205
 
206
206
  and end your turn. Do not invent half-implementations or
207
207
  skip the RED step to pretend a task was completed.
208
+
209
+
210
+ ## Verification evidence handoff
211
+
212
+ Keep operational notes and check requests under runtime `stateDir`, outside the design
213
+ artifacts. Supply evidence per frozen requirement and report failed/unavailable checks.
214
+ Declare benchmark scope and exclusions; Node timings do not prove browser frame time.
215
+ Use scoped checks during repairs and one final full receipt, reused while valid.
216
+ Return a concise handoff; the coordinator owns the single final run summary.
@@ -289,3 +289,14 @@ Verdict: <"clean" | "fix needed: <one-sentence>" | "blocked: <reason>">
289
289
  Then end your turn. The orchestrator decides whether to spawn
290
290
  a second developer pass (if "fix needed") or to close the
291
291
  ticket (if "clean").
292
+
293
+
294
+ ## Structured acceptance handoff
295
+
296
+ Follow the executable pipeline acceptance contract. Return a `stateDir/acceptance.json`
297
+ request covering every frozen requirement with evidence, explicit exceptions, required
298
+ and supplementary checks (including benchmark scope/limitations), and concrete findings.
299
+ Have the coordinator record it with `acceptance --request` before reviewer done and
300
+ archive-check. Inspect visual evidence at supported viewports and extreme states for
301
+ visual changes. A confidence score or checked tasks cannot substitute for acceptance.
302
+ Do not self-authorize material scope changes; cite actual existing user/host decisions.
@@ -247,3 +247,45 @@ Only Core-owned backlog can close after all required delivery succeeds. First co
247
247
  ## Completion
248
248
 
249
249
  Report run/change, frozen tickets/roots, phase statuses, actual receipt commands, acceptance, confidence, archive and per-repository delivery. Distinguish reused evidence, newly executed checks and gaps. Keep failure excerpts bounded and refer to durable receipts. Missing workers, failed gates or incomplete required repositories stay blocked/failed, never falsely complete.
250
+
251
+
252
+ ### Acceptance evidence and completion
253
+
254
+ After development, normal review MUST write `stateDir/acceptance.json` and run
255
+ `acceptance --request <absolute-path>` before `phase --phase reviewer --status done`.
256
+ The request is `{criteria: [...], checks: [...], findings: [...]}`:
257
+ - Each criterion has `specId` (string), `criterionIndex` (zero-based), `requirement`
258
+ (exact frozen text), `status` (`met`, `exception`, `blocked`, `pending`) and a
259
+ nonempty `evidence` array of concrete code/test/capture references and observations.
260
+ Cover every frozen acceptance criterion once. If a spec has no explicit criteria,
261
+ use its complete frozen description (or title if empty) at index 0.
262
+ - An `exception` MUST include `{reason, impact, material, acceptedBy, approvalEvidence}`.
263
+ `acceptedBy` is `reviewer`, `user`, or `host`. Material scope changes require actual
264
+ user/host authorization; do not invent approval or label material changes minor.
265
+ Previously authorized decisions need no new confirmation. Unresolved requirements
266
+ remain `blocked` or `pending`, never `met` through a rewritten interpretation.
267
+ - Each check has `{name, status, required, evidence, scope, limitations}`; status is
268
+ `passed`, `failed`, or `unavailable`. Include required and supplementary checks from
269
+ the design. Record the original required classification; never downgrade a failed
270
+ check to make the gate pass. For benchmarks state what is measured and excluded:
271
+ a Node microbenchmark does not establish browser Canvas/GPU/frame performance.
272
+ - `findings` lists concrete review conclusions, risks and resolutions; use an empty
273
+ array only when no findings remain. Numeric confidence cannot replace this report.
274
+
275
+ The runtime binds this evidence to frozen scope, source and design. Missing/stale
276
+ acceptance or unresolved requirements/required checks block review and archive.
277
+ Accepted exceptions and supplementary failures produce `with-exceptions` validation.
278
+ Replacing the report requires review and archive authorization again; a green command
279
+ receipt alone is insufficient. Evidence references and approval attribution remain
280
+ reviewer assertions, not independently authenticated proof of human approval.
281
+
282
+ Keep operational completion notes, check requests and reports in `stateDir` from
283
+ start to finish. Run scoped checks for repairs and one final full verification after
284
+ all edits. Reuse that full receipt while runtime status says it is valid and its
285
+ commands cover required checks. New prose/phase handoffs alone do not warrant reruns.
286
+
287
+ End with ONE concise summary from runtime `status.completion`: implementation,
288
+ validation (including exceptions), archive, delivery, and evidence references.
289
+ Host-owned delivery stays `pending-host`; do not call uncommitted files "landed".
290
+ Report phase durations/attempts from `status.phases`; report per-phase cost only when
291
+ provider telemetry attributes it, otherwise unavailable. Do not invent cost splits.
@@ -53,3 +53,45 @@ verification block success. Record reviewer done after semantic review, then run
53
53
  `archive-check`. ONLY a successful gate authorizes reviewer archive-only execution.
54
54
  Verify the archive exists and the active change is gone before recording archive
55
55
  done. Never archive inside an ordinary review before the combined gates run.
56
+
57
+
58
+ ### Acceptance evidence and completion
59
+
60
+ After development, normal review MUST write `stateDir/acceptance.json` and run
61
+ `acceptance --request <absolute-path>` before `phase --phase reviewer --status done`.
62
+ The request is `{criteria: [...], checks: [...], findings: [...]}`:
63
+ - Each criterion has `specId` (string), `criterionIndex` (zero-based), `requirement`
64
+ (exact frozen text), `status` (`met`, `exception`, `blocked`, `pending`) and a
65
+ nonempty `evidence` array of concrete code/test/capture references and observations.
66
+ Cover every frozen acceptance criterion once. If a spec has no explicit criteria,
67
+ use its complete frozen description (or title if empty) at index 0.
68
+ - An `exception` MUST include `{reason, impact, material, acceptedBy, approvalEvidence}`.
69
+ `acceptedBy` is `reviewer`, `user`, or `host`. Material scope changes require actual
70
+ user/host authorization; do not invent approval or label material changes minor.
71
+ Previously authorized decisions need no new confirmation. Unresolved requirements
72
+ remain `blocked` or `pending`, never `met` through a rewritten interpretation.
73
+ - Each check has `{name, status, required, evidence, scope, limitations}`; status is
74
+ `passed`, `failed`, or `unavailable`. Include required and supplementary checks from
75
+ the design. Record the original required classification; never downgrade a failed
76
+ check to make the gate pass. For benchmarks state what is measured and excluded:
77
+ a Node microbenchmark does not establish browser Canvas/GPU/frame performance.
78
+ - `findings` lists concrete review conclusions, risks and resolutions; use an empty
79
+ array only when no findings remain. Numeric confidence cannot replace this report.
80
+
81
+ The runtime binds this evidence to frozen scope, source and design. Missing/stale
82
+ acceptance or unresolved requirements/required checks block review and archive.
83
+ Accepted exceptions and supplementary failures produce `with-exceptions` validation.
84
+ Replacing the report requires review and archive authorization again; a green command
85
+ receipt alone is insufficient. Evidence references and approval attribution remain
86
+ reviewer assertions, not independently authenticated proof of human approval.
87
+
88
+ Keep operational completion notes, check requests and reports in `stateDir` from
89
+ start to finish. Run scoped checks for repairs and one final full verification after
90
+ all edits. Reuse that full receipt while runtime status says it is valid and its
91
+ commands cover required checks. New prose/phase handoffs alone do not warrant reruns.
92
+
93
+ End with ONE concise summary from runtime `status.completion`: implementation,
94
+ validation (including exceptions), archive, delivery, and evidence references.
95
+ Host-owned delivery stays `pending-host`; do not call uncommitted files "landed".
96
+ Report phase durations/attempts from `status.phases`; report per-phase cost only when
97
+ provider telemetry attributes it, otherwise unavailable. Do not invent cost splits.