Record the admitted selected path separately from canonical artifact identity in successful and partial Evidence. Anchor relative inputs consistently across both CLI routes using the existing caller-path owner. Adapt shared client verifier assertions and boundary coverage from PR #5261, and the dedicated-route anchoring correction proposed in PR #5265. Historical parsing remains independent of live paths, including legacy records without the parameter. Validation: 118 focused tests in eight files, static and docs checks, discovery, and installed Gemini CLI 0.29.5 loopback verification of 207 schemas/241 examples passed. Synthetic static-analysis fixtures; no live Google API or native target execution. Fixes #5258 Co-authored-by: kwakhyun <khyun2348@naver.com> Co-authored-by: vishal-tambi <tambivishal3@gmail.com>
26 lines
747 B
JavaScript
26 lines
747 B
JavaScript
import assert from "node:assert/strict";
|
|
import { realpath } from "node:fs/promises";
|
|
|
|
/** Verify caller provenance separately from the resolved artifact identity. */
|
|
export const assertJavaScriptApplicationInputPaths = async (
|
|
evidence,
|
|
inputPath,
|
|
) => {
|
|
const canonicalPath = await realpath(inputPath);
|
|
assert.equal(
|
|
evidence.parameters.input_path,
|
|
inputPath,
|
|
"JavaScript Evidence must retain the caller's input_path",
|
|
);
|
|
assert.equal(
|
|
evidence.subject?.local_path,
|
|
canonicalPath,
|
|
"JavaScript Evidence subject must identify the resolved artifact",
|
|
);
|
|
assert.equal(
|
|
evidence.normalized_result.input_path,
|
|
canonicalPath,
|
|
"JavaScript analysis result must identify the resolved artifact",
|
|
);
|
|
};
|