fix(workflows): retain staged output ownership and cancellation semantics

Give atomic Evidence and snapshot writes an explicit resource owner, preserve primary failures and completed publication receipts, and retry retained staging cleanup at the owning lifecycle. Verify inode identity before publishing or deleting; unknown path disappearance remains a cleanup failure. Keep snapshot admission reusable when a session closes and reopens.

Consolidate JavaScript source-scope classification so cancellation cannot fabricate failures for unselected files. Classify configuration failures as invalid input. Remove stale assertions and reuse shared test cleanup ownership.

Validation: 266 focused tests before final ownership tightening, 108 affected tests afterward, static and documentation checks, actual invalid-configuration CLI behavior, and isolated test temporary-directory hygiene.

Refs #1968
This commit is contained in:
morluto
2026-10-12 06:29:27 +08:00
parent 8bd5ba2d23
commit 7285e15839
26 changed files with 988 additions and 126 deletions
+2 -1
View File
@@ -12,9 +12,10 @@ export const readJavaScriptArtifactFiles = (
reader: ArtifactReader,
snapshot: ArtifactInventorySnapshot,
signal?: AbortSignal,
sourcePaths?: readonly string[],
) =>
withArtifactResourceScope((scope) =>
readOwned(reader, snapshot, scope, signal),
readOwned(reader, snapshot, scope, signal, sourcePaths),
);
/** Run a JavaScript analysis with an awaited, test-owned artifact scope. */