@lazyingart/agintiflow 0.20.290 → 0.20.291
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.
|
@@ -408,3 +408,26 @@ The same real session was replayed against the patched source at goal revision
|
|
|
408
408
|
The target stayed at commit `2b35928` with no mutation. Focused planning,
|
|
409
409
|
truthful-completion, and dynamic-budget regressions pass, as does the complete
|
|
410
410
|
AgInTiFlow npm suite. The fix is released in AgInTiFlow `0.20.251`.
|
|
411
|
+
|
|
412
|
+
### Exact source recovery after context loss
|
|
413
|
+
|
|
414
|
+
`database-migration-049` repeated an imperfect SQLite repair task against a
|
|
415
|
+
fresh broken workspace. Automatic routing selected only `qa-testing` and
|
|
416
|
+
`database`, but the first run read the canonical source immediately before
|
|
417
|
+
proactive context compaction. The compacted model correctly requested that
|
|
418
|
+
source again; the retained failed-test read budget exposed a different file,
|
|
419
|
+
so two safe but schema-invalid reads stopped the session without dispatch.
|
|
420
|
+
|
|
421
|
+
AgInTiFlow now treats proactive compaction, local context-window recovery,
|
|
422
|
+
model-timeout compaction, and same-task continuation as bounded context-loss
|
|
423
|
+
boundaries. A current failed-test packet may reopen only its evidence-derived
|
|
424
|
+
production repair paths after such a boundary. Tests, broad discovery,
|
|
425
|
+
arbitrary commands, and unrelated writes remain closed. Once the exact source
|
|
426
|
+
is read in the new context, the ordinary mutation and verification gates apply.
|
|
427
|
+
|
|
428
|
+
The original session resumed against the patched runtime, repaired the
|
|
429
|
+
transactional schema migration, preserved IDs and tags on URL updates, made
|
|
430
|
+
punctuation search literal, added regression coverage, passed four unit tests,
|
|
431
|
+
and committed a clean tree at `b956470`. The independent migration-safety
|
|
432
|
+
contract also passed. The complete npm suite passes, and the runtime fix is
|
|
433
|
+
released in AgInTiFlow `0.20.291`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.291",
|
|
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",
|
|
@@ -2818,6 +2818,113 @@ assertStrict.deepEqual(
|
|
|
2818
2818
|
["service_ctl.py"],
|
|
2819
2819
|
"DeepSeek repair reread fallback was not constrained to the canonical source"
|
|
2820
2820
|
);
|
|
2821
|
+
const postCompactionRepairRuntime = nextStepRuntimeConfig(
|
|
2822
|
+
{ provider: "deepseek", taskProfile: "qa" },
|
|
2823
|
+
{
|
|
2824
|
+
...packetPathReadState,
|
|
2825
|
+
meta: {
|
|
2826
|
+
...packetPathReadState.meta,
|
|
2827
|
+
failedTestRecoveryPacket: {
|
|
2828
|
+
...packetPathReadState.meta.failedTestRecoveryPacket,
|
|
2829
|
+
paths: ["tests/test_service_ctl.py", "legacy_fixture.py", "service_ctl.py"],
|
|
2830
|
+
repairPaths: ["legacy_fixture.py", "service_ctl.py"],
|
|
2831
|
+
},
|
|
2832
|
+
toolLoop: {
|
|
2833
|
+
stagnationEpoch: 10,
|
|
2834
|
+
lastContextRecovery: {
|
|
2835
|
+
reason: "proactive-context-compaction",
|
|
2836
|
+
at: "2026-08-24T02:00:13.000Z",
|
|
2837
|
+
preservedStaticEvidence: true,
|
|
2838
|
+
},
|
|
2839
|
+
recent: [
|
|
2840
|
+
...packetPathReadState.meta.toolLoop.recent,
|
|
2841
|
+
{
|
|
2842
|
+
toolName: "read_file",
|
|
2843
|
+
path: "tests/test_service_ctl.py",
|
|
2844
|
+
ok: true,
|
|
2845
|
+
blocked: false,
|
|
2846
|
+
at: "2026-08-24T02:00:12.000Z",
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
toolName: "read_file",
|
|
2850
|
+
path: "legacy_fixture.py",
|
|
2851
|
+
ok: true,
|
|
2852
|
+
blocked: false,
|
|
2853
|
+
at: "2026-08-24T02:00:12.500Z",
|
|
2854
|
+
},
|
|
2855
|
+
],
|
|
2856
|
+
},
|
|
2857
|
+
},
|
|
2858
|
+
}
|
|
2859
|
+
);
|
|
2860
|
+
assertStrict.deepEqual(
|
|
2861
|
+
postCompactionRepairRuntime.testFailureRepairContextPaths,
|
|
2862
|
+
["legacy_fixture.py", "service_ctl.py"],
|
|
2863
|
+
"context compaction did not reopen the exact production source lost from model context"
|
|
2864
|
+
);
|
|
2865
|
+
assertStrict.equal(
|
|
2866
|
+
postCompactionRepairRuntime.testFailureRepairNeedsPatchContext,
|
|
2867
|
+
true,
|
|
2868
|
+
"context compaction did not restore one bounded source-context turn before mutation"
|
|
2869
|
+
);
|
|
2870
|
+
const postCompactionRepairTools = selectProgressiveTools(allTools, {
|
|
2871
|
+
config: postCompactionRepairRuntime,
|
|
2872
|
+
goal: "Continue the failed-test repair after proactive context compaction.",
|
|
2873
|
+
profile: "qa",
|
|
2874
|
+
});
|
|
2875
|
+
sameNames(
|
|
2876
|
+
postCompactionRepairTools,
|
|
2877
|
+
["read_file", "apply_patch", "finish"],
|
|
2878
|
+
"post-compaction repair reopened broad discovery or verification tools"
|
|
2879
|
+
);
|
|
2880
|
+
assertStrict.deepEqual(
|
|
2881
|
+
postCompactionRepairTools[0].function.parameters.properties.path.enum,
|
|
2882
|
+
["legacy_fixture.py", "service_ctl.py"],
|
|
2883
|
+
"post-compaction repair did not constrain rereads to all canonical production sources"
|
|
2884
|
+
);
|
|
2885
|
+
const sameTaskContinuationRepairRuntime = nextStepRuntimeConfig(
|
|
2886
|
+
{ provider: "deepseek", taskProfile: "qa" },
|
|
2887
|
+
{
|
|
2888
|
+
...packetPathReadState,
|
|
2889
|
+
meta: {
|
|
2890
|
+
...packetPathReadState.meta,
|
|
2891
|
+
failedTestRecoveryPacket: {
|
|
2892
|
+
...packetPathReadState.meta.failedTestRecoveryPacket,
|
|
2893
|
+
paths: ["tests/test_service_ctl.py", "legacy_fixture.py", "service_ctl.py"],
|
|
2894
|
+
repairPaths: ["legacy_fixture.py", "service_ctl.py"],
|
|
2895
|
+
},
|
|
2896
|
+
toolLoop: {
|
|
2897
|
+
stagnationEpoch: 11,
|
|
2898
|
+
lastContextRecovery: {
|
|
2899
|
+
reason: "same-task-continuation",
|
|
2900
|
+
at: "2026-08-24T02:01:00.000Z",
|
|
2901
|
+
},
|
|
2902
|
+
recent: [
|
|
2903
|
+
...packetPathReadState.meta.toolLoop.recent,
|
|
2904
|
+
{
|
|
2905
|
+
toolName: "read_file",
|
|
2906
|
+
path: "tests/test_service_ctl.py",
|
|
2907
|
+
ok: true,
|
|
2908
|
+
blocked: false,
|
|
2909
|
+
at: "2026-08-24T02:00:12.000Z",
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
toolName: "read_file",
|
|
2913
|
+
path: "legacy_fixture.py",
|
|
2914
|
+
ok: true,
|
|
2915
|
+
blocked: false,
|
|
2916
|
+
at: "2026-08-24T02:00:12.500Z",
|
|
2917
|
+
},
|
|
2918
|
+
],
|
|
2919
|
+
},
|
|
2920
|
+
},
|
|
2921
|
+
}
|
|
2922
|
+
);
|
|
2923
|
+
assertStrict.deepEqual(
|
|
2924
|
+
sameTaskContinuationRepairRuntime.testFailureRepairContextPaths,
|
|
2925
|
+
["legacy_fixture.py", "service_ctl.py"],
|
|
2926
|
+
"same-task continuation did not reopen all retained canonical production sources"
|
|
2927
|
+
);
|
|
2821
2928
|
const testOnlyPacketState = {
|
|
2822
2929
|
meta: {
|
|
2823
2930
|
projectVerification: {
|
package/src/agent-runner.js
CHANGED
|
@@ -14588,11 +14588,34 @@ export function nextStepRuntimeConfig(config = {}, state = {}) {
|
|
|
14588
14588
|
Date.parse(String(state.meta?.failedTestRecoveryPacket?.generatedAt || "")),
|
|
14589
14589
|
Date.parse(String(state.meta?.failedTestFocusedRecovery?.at || "")),
|
|
14590
14590
|
].filter(Number.isFinite);
|
|
14591
|
-
const
|
|
14591
|
+
const retainedRecoveryPacketContextAt = Number.isFinite(failureAt)
|
|
14592
14592
|
? failureAt
|
|
14593
14593
|
: recoveryPacketContextMarkers.length
|
|
14594
14594
|
? Math.max(...recoveryPacketContextMarkers)
|
|
14595
14595
|
: Number.NaN;
|
|
14596
|
+
const latestContextRecovery = state.meta?.toolLoop?.lastContextRecovery;
|
|
14597
|
+
const latestContextRecoveryAt = Date.parse(
|
|
14598
|
+
String(latestContextRecovery?.at || "")
|
|
14599
|
+
);
|
|
14600
|
+
const postContextLossRepairContext = Boolean(
|
|
14601
|
+
Number.isFinite(latestContextRecoveryAt) &&
|
|
14602
|
+
(!Number.isFinite(retainedRecoveryPacketContextAt) ||
|
|
14603
|
+
latestContextRecoveryAt > retainedRecoveryPacketContextAt) &&
|
|
14604
|
+
[
|
|
14605
|
+
"proactive-context-compaction",
|
|
14606
|
+
"local-context-budget-retry",
|
|
14607
|
+
"model-timeout-retry",
|
|
14608
|
+
"same-task-continuation",
|
|
14609
|
+
].includes(String(latestContextRecovery?.reason || ""))
|
|
14610
|
+
);
|
|
14611
|
+
const recoveryPacketContextAt = postContextLossRepairContext
|
|
14612
|
+
? latestContextRecoveryAt
|
|
14613
|
+
: retainedRecoveryPacketContextAt;
|
|
14614
|
+
const activeRecoveryPacketPaths = postContextLossRepairContext
|
|
14615
|
+
? recoveryPacketRepairPaths
|
|
14616
|
+
.filter((item) => !failedTestPathIsTestEvidence(item))
|
|
14617
|
+
.slice(0, 6)
|
|
14618
|
+
: recoveryPacketPaths;
|
|
14596
14619
|
const consumedRecoveryPacketPaths = new Set(
|
|
14597
14620
|
Number.isFinite(recoveryPacketContextAt)
|
|
14598
14621
|
? (Array.isArray(toolLoop.recent) ? toolLoop.recent : [])
|
|
@@ -14610,7 +14633,7 @@ export function nextStepRuntimeConfig(config = {}, state = {}) {
|
|
|
14610
14633
|
.filter(Boolean)
|
|
14611
14634
|
: []
|
|
14612
14635
|
);
|
|
14613
|
-
const unreadRecoveryPacketPaths =
|
|
14636
|
+
const unreadRecoveryPacketPaths = activeRecoveryPacketPaths.filter(
|
|
14614
14637
|
(item) => !consumedRecoveryPacketPaths.has(item)
|
|
14615
14638
|
);
|
|
14616
14639
|
const recoveryPacketReadCounts = new Map();
|
|
@@ -14635,7 +14658,7 @@ export function nextStepRuntimeConfig(config = {}, state = {}) {
|
|
|
14635
14658
|
}
|
|
14636
14659
|
}
|
|
14637
14660
|
const exactRecoveryPacketContextActive = Boolean(
|
|
14638
|
-
|
|
14661
|
+
activeRecoveryPacketPaths.length && Number.isFinite(recoveryPacketContextAt)
|
|
14639
14662
|
);
|
|
14640
14663
|
const recoveryPacketHasProductionContext = [
|
|
14641
14664
|
...recoveryPacketPaths,
|