fix(artifacts): compare inventories using declared coverage (#2214)
* fix(artifacts): preserve complete root inventory comparisons * fix(artifacts): declare inventory coverage before comparison * fix(artifacts): preserve traversal omissions and materialization limits * fix(artifacts): preserve coverage declarations and projection scope Remove the duplicate inventory-schema import. Compare original coverage declarations, including field omission, before adapting legacy pages. Require explicit scope for completeness and container-entry coverage for application projections. Source inspection and git diff --check only. Tests, builds and typechecks skipped by explicit user request. GitHub review writes paused globally. * fix(artifacts): require entry coverage for child changes * fix(artifacts): accept source-valid inventory limitations * style(artifacts): format mobile graph projection --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> Co-authored-by: OpenAI Codex <openai-codex@users.noreply.github.com>
This commit is contained in:
co-authored by
morluto
OpenAI Codex
parent
e4186af31b
commit
45a3509db3
@@ -17,6 +17,7 @@ import { execFileOutput } from "../../../../src/process/ExecFileOutput.js";
|
||||
import {
|
||||
ArtifactReaderFailure,
|
||||
type ArtifactEntry,
|
||||
type ArtifactTraversalOmission,
|
||||
} from "../../../../src/artifacts/ArtifactReader.js";
|
||||
import { ArtifactResourceScope } from "../../../../src/artifacts/ArtifactResourceScope.js";
|
||||
import { DirectoryArtifactReader } from "../../../../src/artifacts/DirectoryArtifactReader.js";
|
||||
@@ -473,10 +474,10 @@ describe("native DMG traversal shutdown", () => {
|
||||
.mockImplementation(async function* (
|
||||
this: DirectoryArtifactReader,
|
||||
signal?: AbortSignal,
|
||||
descendInto?: (path: string) => boolean,
|
||||
selection?: Parameters<DirectoryArtifactReader["entries"]>[1],
|
||||
) {
|
||||
const iterator = originalEntries
|
||||
.call(this, signal, descendInto)
|
||||
.call(this, signal, selection)
|
||||
[Symbol.asyncIterator]();
|
||||
try {
|
||||
for (;;) {
|
||||
@@ -606,9 +607,20 @@ describe("native DMG artifact reader", () => {
|
||||
undefined,
|
||||
host,
|
||||
);
|
||||
if (mountPoint === undefined) throw new Error("expected mounted directory");
|
||||
if (process.platform !== "win32")
|
||||
await execFileOutput("mkfifo", [join(mountPoint, "special.pipe")]);
|
||||
const entries = [];
|
||||
for await (const entry of reader.entries()) entries.push(entry.path);
|
||||
const omissions: ArtifactTraversalOmission[] = [];
|
||||
for await (const entry of reader.entries(undefined, {
|
||||
onOmission: (omission) => omissions.push(omission),
|
||||
}))
|
||||
entries.push(entry.path);
|
||||
expect(entries).toContain("image.dmg/Fixture/hello.txt");
|
||||
if (process.platform !== "win32")
|
||||
expect(omissions).toEqual([
|
||||
{ path: "image.dmg/Fixture/special.pipe", kind: "fifo" },
|
||||
]);
|
||||
const provenance = reader.provenance();
|
||||
const first = provenance[0];
|
||||
if (first === undefined) throw new Error("expected attachment provenance");
|
||||
|
||||
Reference in New Issue
Block a user