@lazyingart/agintiflow 0.20.319 → 0.20.320
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.320",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -4615,6 +4615,46 @@ try {
|
|
|
4615
4615
|
mutatingPipedTestResult.nonAuthoritativeTestOutputPipeline !== true,
|
|
4616
4616
|
"a source mutation appended to an unsafe test pipeline escaped revision tracking"
|
|
4617
4617
|
);
|
|
4618
|
+
const workspaceCdWrappedTestCommand =
|
|
4619
|
+
`cd ${workspace} && PYTHONPATH=src python -m pytest tests/test_wechat_document_reader.py -v; echo "EXIT=$?"`;
|
|
4620
|
+
assert(
|
|
4621
|
+
isSubstantiveTestCommand(workspaceCdWrappedTestCommand, {
|
|
4622
|
+
commandCwd: workspace,
|
|
4623
|
+
}),
|
|
4624
|
+
"a safe explicit-status test wrapper lost test identity behind a workspace cd"
|
|
4625
|
+
);
|
|
4626
|
+
const workspaceCdWrappedTestState = {
|
|
4627
|
+
meta: { goalContract: { revision: 1 } },
|
|
4628
|
+
};
|
|
4629
|
+
const workspaceCdWrappedTestResult = {
|
|
4630
|
+
toolName: "run_command",
|
|
4631
|
+
ok: true,
|
|
4632
|
+
exitCode: 0,
|
|
4633
|
+
args: { command: workspaceCdWrappedTestCommand },
|
|
4634
|
+
stdout: "7 passed in 0.06s\nEXIT=0\n",
|
|
4635
|
+
stderr: "",
|
|
4636
|
+
projectMutationPaths: [],
|
|
4637
|
+
commandPolicy: classifyCommand(workspaceCdWrappedTestCommand),
|
|
4638
|
+
};
|
|
4639
|
+
recordProjectVerificationOutcome(
|
|
4640
|
+
workspaceCdWrappedTestState,
|
|
4641
|
+
workspaceCdWrappedTestResult,
|
|
4642
|
+
{
|
|
4643
|
+
commandCwd: workspace,
|
|
4644
|
+
taskProfile: "qa",
|
|
4645
|
+
allowShellTool: true,
|
|
4646
|
+
sandboxMode: "host",
|
|
4647
|
+
}
|
|
4648
|
+
);
|
|
4649
|
+
assert(
|
|
4650
|
+
workspaceCdWrappedTestResult.projectTest?.passed === true &&
|
|
4651
|
+
workspaceCdWrappedTestState.meta.projectVerification?.testRuns?.length === 1,
|
|
4652
|
+
`a successful workspace-cd status wrapper did not produce one passing test run: ${JSON.stringify({
|
|
4653
|
+
projectTest: workspaceCdWrappedTestResult.projectTest,
|
|
4654
|
+
testRuns:
|
|
4655
|
+
workspaceCdWrappedTestState.meta.projectVerification?.testRuns,
|
|
4656
|
+
})}`
|
|
4657
|
+
);
|
|
4618
4658
|
const pipedUnittestCommand =
|
|
4619
4659
|
"python3 -m unittest discover -s tests -p 'test_wechat_document_reader.py' -v 2>&1 | tail -14; echo \"EXIT=${PIPESTATUS[0]}\"";
|
|
4620
4660
|
assert(
|
package/src/agent-runner.js
CHANGED
|
@@ -5495,10 +5495,12 @@ export function isSubstantiveTestCommand(command = "", config = {}) {
|
|
|
5495
5495
|
if (isRetainedExactVerificationCommand(command, config)) return true;
|
|
5496
5496
|
const normalized = normalizeProjectCommand(normalizeCommandForPolicy(command, config));
|
|
5497
5497
|
if (projectTestCommandWrapper(normalized)) return true;
|
|
5498
|
-
const
|
|
5498
|
+
const wrappedTestCommand =
|
|
5499
|
+
projectExitStatusWrapper(normalized)?.command || normalized;
|
|
5500
|
+
const text = normalizeLeadingWorkspaceCd(wrappedTestCommand, config);
|
|
5499
5501
|
if (!text) return false;
|
|
5500
|
-
const classification =
|
|
5501
|
-
if (classification.substantiveTest !== true) return false;
|
|
5502
|
+
const classification = boundedTestCommandClassification(text);
|
|
5503
|
+
if (classification.policy.substantiveTest !== true) return false;
|
|
5502
5504
|
const sequence = parseTopLevelShellSequence(text);
|
|
5503
5505
|
if (sequence.commands.length <= 1) return true;
|
|
5504
5506
|
if (!sequence.separators.every((separator) => separator === "&&")) return false;
|
|
@@ -5506,9 +5508,17 @@ export function isSubstantiveTestCommand(command = "", config = {}) {
|
|
|
5506
5508
|
let lastTestIndex = -1;
|
|
5507
5509
|
let lastMutationIndex = -1;
|
|
5508
5510
|
sequence.commands.forEach((segment, index) => {
|
|
5509
|
-
const
|
|
5511
|
+
const segmentClassification = boundedTestCommandClassification(segment);
|
|
5512
|
+
const segmentPolicy = segmentClassification.policy;
|
|
5510
5513
|
if (segmentPolicy.substantiveTest === true) lastTestIndex = index;
|
|
5511
|
-
if (
|
|
5514
|
+
if (
|
|
5515
|
+
commandCanMutateProjectContent(
|
|
5516
|
+
segmentClassification.executableCommand,
|
|
5517
|
+
segmentPolicy
|
|
5518
|
+
)
|
|
5519
|
+
) {
|
|
5520
|
+
lastMutationIndex = index;
|
|
5521
|
+
}
|
|
5512
5522
|
});
|
|
5513
5523
|
return lastTestIndex >= 0 && lastTestIndex >= lastMutationIndex;
|
|
5514
5524
|
}
|