mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-08 07:37:48 +02:00
test: fix Windows ownership paths and failure annotations
This commit is contained in:
@@ -121,7 +121,7 @@ returned HTTP 401 from redirected storage. Check metadata confirms failures
|
|||||||
occur during tests after successful dependency installation. Failed-suite
|
occur during tests after successful dependency installation. Failed-suite
|
||||||
annotations now expose bounded diagnostic context through the checks API.
|
annotations now expose bounded diagnostic context through the checks API.
|
||||||
The runner also counts subprocess failure when a suite prints `Failed: 0`.
|
The runner also counts subprocess failure when a suite prints `Failed: 0`.
|
||||||
Seven isolated runner regressions pass.
|
Eight isolated runner regressions pass.
|
||||||
|
|
||||||
Follow-up review reproduced additional release defects. Ordered JSON merges
|
Follow-up review reproduced additional release defects. Ordered JSON merges
|
||||||
to one Kimi destination were collapsed by destination-only preview indexing;
|
to one Kimi destination were collapsed by destination-only preview indexing;
|
||||||
@@ -132,3 +132,12 @@ and 36 existing settings tests pass). Static PowerShell alias and stdin values
|
|||||||
are resolved conservatively, with independent review covering mixed named and
|
are resolved conservatively, with independent review covering mixed named and
|
||||||
positional alias arguments. Hosted verification on the final patch remains
|
positional alias arguments. Hosted verification on the final patch remains
|
||||||
required before merge or release.
|
required before merge or release.
|
||||||
|
|
||||||
|
Run 34164970113 on 14e731c6 exposed the Windows failure through the new check
|
||||||
|
annotations: the Antigravity ownership fixture searched a native Windows source
|
||||||
|
path using a POSIX-only literal, then dereferenced a missing operation. The
|
||||||
|
fixture now normalizes separators and asserts both planned operations exist;
|
||||||
|
all 23 ownership tests pass locally. The diagnostic matcher also uses escaped
|
||||||
|
Unicode literals to satisfy the repository's Unicode gate, and excludes passing
|
||||||
|
error-handling case names from failure excerpts. Fresh hosted validation must
|
||||||
|
confirm these final fixture and diagnostic corrections.
|
||||||
|
|||||||
@@ -84,6 +84,13 @@ const tests = [
|
|||||||
assert.strictEqual(result.status, 1);
|
assert.strictEqual(result.status, 1);
|
||||||
assert.match(result.annotations[0], /SIGTERM/);
|
assert.match(result.annotations[0], /SIGTERM/);
|
||||||
}],
|
}],
|
||||||
|
['passing error-handling cases cannot hide the actual failure', () => {
|
||||||
|
const output = `${'PASS handles Error conditions\n'.repeat(5)}FAIL actual regression\n AssertionError: mismatch\nFailed: 1`;
|
||||||
|
const result = run({ status: 1, stdout: output });
|
||||||
|
assert.match(result.annotations[0], /FAIL actual regression/);
|
||||||
|
assert.match(result.annotations[0], /AssertionError: mismatch/);
|
||||||
|
assert.ok(!result.annotations[0].includes('PASS handles'));
|
||||||
|
}],
|
||||||
['healthy suites preserve successful totals and emit no annotation', () => {
|
['healthy suites preserve successful totals and emit no annotation', () => {
|
||||||
const result = run({ status: 0, stdout: 'Passed: 3, Failed: 0' });
|
const result = run({ status: 0, stdout: 'Passed: 3, Failed: 0' });
|
||||||
assert.strictEqual(result.status, 0);
|
assert.strictEqual(result.status, 0);
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ function escapeAnnotation(value, property = false) {
|
|||||||
function annotateFailure(displayPath, reason, output) {
|
function annotateFailure(displayPath, reason, output) {
|
||||||
if (process.env.GITHUB_ACTIONS !== 'true') return;
|
if (process.env.GITHUB_ACTIONS !== 'true') return;
|
||||||
const context = output.split(/\r?\n/)
|
const context = output.split(/\r?\n/)
|
||||||
.filter(line => /\b(?:FAIL|[A-Za-z]*Error)\b|[✗❌]/i.test(line))
|
.filter(line => /^\s*(?:FAIL\b|not ok\b|[A-Za-z]*Error\b|[\u2717\u274c])/i.test(line))
|
||||||
.slice(0, 3)
|
.slice(0, 3)
|
||||||
.join('\n');
|
.join('\n');
|
||||||
const message = [reason, context].filter(Boolean).join(': ').slice(0, 1000);
|
const message = [reason, context].filter(Boolean).join(': ').slice(0, 1000);
|
||||||
|
|||||||
@@ -71,11 +71,15 @@ for (const adapter of listInstallTargetAdapters()) {
|
|||||||
|
|
||||||
test('Antigravity transforms preserve a conflicting agent and still update managed files', context => {
|
test('Antigravity transforms preserve a conflicting agent and still update managed files', context => {
|
||||||
const plan = createManifestInstallPlan({ ...context, target: 'antigravity', moduleIds: ['agents-core'] });
|
const plan = createManifestInstallPlan({ ...context, target: 'antigravity', moduleIds: ['agents-core'] });
|
||||||
const userOperation = plan.operations.find(item => item.sourceRelativePath === 'agents/architect.md');
|
const userOperation = plan.operations.find(item => (
|
||||||
|
item.sourceRelativePath.replace(/\\/g, '/') === 'agents/architect.md'
|
||||||
|
));
|
||||||
|
assert.ok(userOperation, 'agent plan must include the architect source on every platform');
|
||||||
fs.mkdirSync(path.dirname(userOperation.destinationPath), { recursive: true });
|
fs.mkdirSync(path.dirname(userOperation.destinationPath), { recursive: true });
|
||||||
fs.writeFileSync(userOperation.destinationPath, 'My architect\n');
|
fs.writeFileSync(userOperation.destinationPath, 'My architect\n');
|
||||||
applyInstallPlan(plan);
|
applyInstallPlan(plan);
|
||||||
const managed = plan.operations.find(item => item.destinationPath !== userOperation.destinationPath);
|
const managed = plan.operations.find(item => item.destinationPath !== userOperation.destinationPath);
|
||||||
|
assert.ok(managed, 'agent plan must also include a separately managed file');
|
||||||
const original = fs.readFileSync(managed.destinationPath, 'utf8');
|
const original = fs.readFileSync(managed.destinationPath, 'utf8');
|
||||||
fs.writeFileSync(managed.destinationPath, 'old managed version\n');
|
fs.writeFileSync(managed.destinationPath, 'old managed version\n');
|
||||||
applyInstallPlan(plan);
|
applyInstallPlan(plan);
|
||||||
|
|||||||
Reference in New Issue
Block a user