looply-cli 0.5.52 → 0.5.54
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/dist/autonomy-controller.d.ts.map +1 -1
- package/dist/autonomy-controller.js +19 -0
- package/dist/autonomy-controller.js.map +1 -1
- package/dist/branch-delivery-wiring.d.ts +23 -0
- package/dist/branch-delivery-wiring.d.ts.map +1 -1
- package/dist/branch-delivery-wiring.js +189 -38
- package/dist/branch-delivery-wiring.js.map +1 -1
- package/dist/branch-delivery.d.ts +58 -1
- package/dist/branch-delivery.d.ts.map +1 -1
- package/dist/branch-delivery.js +242 -9
- package/dist/branch-delivery.js.map +1 -1
- package/dist/bug-repro.d.ts +99 -11
- package/dist/bug-repro.d.ts.map +1 -1
- package/dist/bug-repro.js +236 -15
- package/dist/bug-repro.js.map +1 -1
- package/dist/daemon-cmd.d.ts.map +1 -1
- package/dist/daemon-cmd.js +53 -2
- package/dist/daemon-cmd.js.map +1 -1
- package/dist/earlier-answers-cache.d.ts +71 -0
- package/dist/earlier-answers-cache.d.ts.map +1 -0
- package/dist/earlier-answers-cache.js +253 -0
- package/dist/earlier-answers-cache.js.map +1 -0
- package/dist/failing-checks-tick.d.ts +158 -0
- package/dist/failing-checks-tick.d.ts.map +1 -0
- package/dist/failing-checks-tick.js +313 -0
- package/dist/failing-checks-tick.js.map +1 -0
- package/dist/feature-report.d.ts +2 -0
- package/dist/feature-report.d.ts.map +1 -1
- package/dist/feature-report.js +19 -5
- package/dist/feature-report.js.map +1 -1
- package/dist/gate-health.d.ts +8 -0
- package/dist/gate-health.d.ts.map +1 -1
- package/dist/gate-health.js +13 -0
- package/dist/gate-health.js.map +1 -1
- package/dist/goal-adaptive.d.ts +56 -3
- package/dist/goal-adaptive.d.ts.map +1 -1
- package/dist/goal-adaptive.js +126 -12
- package/dist/goal-adaptive.js.map +1 -1
- package/dist/goal-already-met.d.ts +62 -0
- package/dist/goal-already-met.d.ts.map +1 -0
- package/dist/goal-already-met.js +95 -0
- package/dist/goal-already-met.js.map +1 -0
- package/dist/goal-execution-evidence.d.ts +7 -1
- package/dist/goal-execution-evidence.d.ts.map +1 -1
- package/dist/goal-execution-evidence.js +12 -1
- package/dist/goal-execution-evidence.js.map +1 -1
- package/dist/goal-gap.d.ts +63 -7
- package/dist/goal-gap.d.ts.map +1 -1
- package/dist/goal-gap.js +126 -18
- package/dist/goal-gap.js.map +1 -1
- package/dist/project-memory-store.d.ts +7 -0
- package/dist/project-memory-store.d.ts.map +1 -1
- package/dist/project-memory-store.js +31 -1
- package/dist/project-memory-store.js.map +1 -1
- package/dist/project-terminal.d.ts +1 -0
- package/dist/project-terminal.d.ts.map +1 -1
- package/dist/project-terminal.js +14 -2
- package/dist/project-terminal.js.map +1 -1
- package/dist/pursuit-ending.d.ts.map +1 -1
- package/dist/pursuit-ending.js +11 -0
- package/dist/pursuit-ending.js.map +1 -1
- package/dist/run-cmd.d.ts.map +1 -1
- package/dist/run-cmd.js +92 -6
- package/dist/run-cmd.js.map +1 -1
- package/dist/run-refusal-marks.d.ts +12 -0
- package/dist/run-refusal-marks.d.ts.map +1 -1
- package/dist/run-refusal-marks.js +22 -3
- package/dist/run-refusal-marks.js.map +1 -1
- package/dist/server-client.d.ts +32 -0
- package/dist/server-client.d.ts.map +1 -1
- package/dist/server-client.js +38 -0
- package/dist/server-client.js.map +1 -1
- package/dist/setup-check-wiring.d.ts +8 -0
- package/dist/setup-check-wiring.d.ts.map +1 -1
- package/dist/setup-check-wiring.js +61 -9
- package/dist/setup-check-wiring.js.map +1 -1
- package/dist/setup-check.d.ts +43 -1
- package/dist/setup-check.d.ts.map +1 -1
- package/dist/setup-check.js +125 -3
- package/dist/setup-check.js.map +1 -1
- package/dist/visual-proof-browser.d.ts +6 -0
- package/dist/visual-proof-browser.d.ts.map +1 -1
- package/dist/visual-proof-browser.js +16 -0
- package/dist/visual-proof-browser.js.map +1 -1
- package/dist/visual-proof-config.d.ts +10 -1
- package/dist/visual-proof-config.d.ts.map +1 -1
- package/dist/visual-proof-config.js +20 -2
- package/dist/visual-proof-config.js.map +1 -1
- package/dist/visual-proof-detect.d.ts +45 -3
- package/dist/visual-proof-detect.d.ts.map +1 -1
- package/dist/visual-proof-detect.js +60 -3
- package/dist/visual-proof-detect.js.map +1 -1
- package/dist/visual-proof-run.d.ts +8 -0
- package/dist/visual-proof-run.d.ts.map +1 -1
- package/dist/visual-proof-run.js +16 -6
- package/dist/visual-proof-run.js.map +1 -1
- package/package.json +2 -2
- package/win/contained-node.cjs +110 -1
- package/dist/.src-hash +0 -1
package/dist/run-cmd.js
CHANGED
|
@@ -74,6 +74,7 @@ const planner_timeouts_1 = require("./planner-timeouts");
|
|
|
74
74
|
const plan_recovery_1 = require("./plan-recovery");
|
|
75
75
|
const goal_execution_evidence_1 = require("./goal-execution-evidence");
|
|
76
76
|
const goal_reproof_1 = require("./goal-reproof");
|
|
77
|
+
const goal_already_met_1 = require("./goal-already-met");
|
|
77
78
|
const goal_replay_1 = require("./goal-replay");
|
|
78
79
|
const branch_replay_1 = require("./branch-replay");
|
|
79
80
|
const run_base_2 = require("./run-base");
|
|
@@ -111,6 +112,7 @@ const providers_1 = require("./providers");
|
|
|
111
112
|
const core_4 = require("@looply/core");
|
|
112
113
|
const core_5 = require("@looply/core");
|
|
113
114
|
const feature_settings_cache_1 = require("./feature-settings-cache");
|
|
115
|
+
const earlier_answers_cache_1 = require("./earlier-answers-cache");
|
|
114
116
|
const ticket_attachments_1 = require("./ticket-attachments");
|
|
115
117
|
const queue_write_lease_1 = require("./queue-write-lease");
|
|
116
118
|
const surface_lease_1 = require("./surface-lease");
|
|
@@ -399,7 +401,9 @@ async function rememberHumanDecisions(store, config, projectKey) {
|
|
|
399
401
|
* What a project used to hold is part of how it came to hold what it does.
|
|
400
402
|
*/
|
|
401
403
|
const live = new Set(config.decisions.map((d) => `${d.subject}\u0000${d.decision}`));
|
|
402
|
-
|
|
404
|
+
// The config's own decisions only: what people answered in AutoRyn is a decision too, and the config does not hold
|
|
405
|
+
// it, so without this every earlier answer would be withdrawn here on every run (`earlier-answers-cache.ts`).
|
|
406
|
+
for (const r of store.current(null, { kind: 'decision', notVia: 'earlier-answer' })) {
|
|
403
407
|
if (live.has(`${r.subject}\u0000${r.content}`))
|
|
404
408
|
continue;
|
|
405
409
|
await store.remember({
|
|
@@ -453,12 +457,19 @@ graph) {
|
|
|
453
457
|
return null;
|
|
454
458
|
const tree = await git.headTreeSha().catch(() => null);
|
|
455
459
|
const records = [
|
|
456
|
-
|
|
460
|
+
// The config's decisions, under "these constrain you". What people answered in AutoRyn is NOT among them: a
|
|
461
|
+
// learned answer is precedent, not a constraint to obey everywhere, so it gets its own block below with words
|
|
462
|
+
// that say how far it reaches (`earlier-answers.ts`).
|
|
463
|
+
...store.current(tree, { kind: 'decision', notVia: 'earlier-answer' }),
|
|
457
464
|
...store.current(tree, { kind: 'fact' }),
|
|
458
465
|
...store.current(tree, { kind: 'attempt', ...(scope.goalId === undefined ? {} : { goalId: scope.goalId }) }),
|
|
459
466
|
...store.current(tree, { kind: 'inference' }),
|
|
460
467
|
];
|
|
461
|
-
|
|
468
|
+
const rest = (0, core_1.renderMemoryContext)((0, core_1.assembleMemoryContext)(records, undefined, relevantIds(graph, scope.goalId)));
|
|
469
|
+
const answers = (0, earlier_answers_cache_1.earlierAnswersForPlan)((0, earlier_answers_cache_1.earlierAnswerViews)(store));
|
|
470
|
+
if (answers === null)
|
|
471
|
+
return rest;
|
|
472
|
+
return rest === null ? answers : `${rest}\n\n${answers}`;
|
|
462
473
|
}
|
|
463
474
|
/**
|
|
464
475
|
* Which remembered records the graph says are about the work in hand.
|
|
@@ -850,6 +861,14 @@ async function runLoop(opts) {
|
|
|
850
861
|
// The person's decisions, before anything plans or works. A decision read
|
|
851
862
|
// after the plan is a constraint applied too late.
|
|
852
863
|
await rememberHumanDecisions(memoryStore, config, memoryKey);
|
|
864
|
+
/**
|
|
865
|
+
* And what people answered in AutoRyn, on the same footing: a person's decision, read before anything plans. The
|
|
866
|
+
* list is AutoRyn's; the daemon keeps the server's copy in the project state, and this keeps it as memory —
|
|
867
|
+
* withdrawing what was switched off or removed there. No copy (an older server) changes nothing.
|
|
868
|
+
*/
|
|
869
|
+
const answersKept = await (0, earlier_answers_cache_1.rememberEarlierAnswers)(memoryStore, (0, earlier_answers_cache_1.readEarlierAnswersCache)(projectStateDirPath), memoryKey);
|
|
870
|
+
if (answersKept.withdrawn > 0)
|
|
871
|
+
log(`answers : ${answersKept.withdrawn} earlier answer(s) switched off or removed in AutoRyn are no longer used`);
|
|
853
872
|
const git = new git_driver_1.GitDriver((0, git_driver_1.nodeGitExec)(cwd));
|
|
854
873
|
/**
|
|
855
874
|
* What the repository IS, established deterministically and remembered.
|
|
@@ -3093,6 +3112,8 @@ async function runLoop(opts) {
|
|
|
3093
3112
|
goalText: (0, ticket_attachments_1.withAttachments)(binding.goal.text, cwd, `${binding.goal.id}@${binding.goal.version}`),
|
|
3094
3113
|
projectName: config.project.name,
|
|
3095
3114
|
gates: config.gates,
|
|
3115
|
+
// The test writer looks at what people already answered before it asks where the bug is.
|
|
3116
|
+
earlierAnswers: (0, earlier_answers_cache_1.earlierAnswerViews)(memoryStore),
|
|
3096
3117
|
}, {
|
|
3097
3118
|
invoke: agent,
|
|
3098
3119
|
run: gateRunnerHere(false),
|
|
@@ -3531,7 +3552,13 @@ async function runLoop(opts) {
|
|
|
3531
3552
|
});
|
|
3532
3553
|
// A reproduced bug is met only when its test passes at this tree, run by the machine (`bug-repro.ts`).
|
|
3533
3554
|
// The ticket's images are named to the check too (LOO-B-2).
|
|
3534
|
-
|
|
3555
|
+
// What people already answered in AutoRyn, read now: the check looks there before it asks anything.
|
|
3556
|
+
const earlier = (0, earlier_answers_cache_1.earlierAnswerViews)(memoryStore);
|
|
3557
|
+
const seen = {
|
|
3558
|
+
...i,
|
|
3559
|
+
goalText: (0, ticket_attachments_1.withAttachments)(i.goalText, cwd, `${bound.id}@${bound.version}`),
|
|
3560
|
+
...(earlier.length === 0 ? {} : { earlierAnswers: earlier }),
|
|
3561
|
+
};
|
|
3535
3562
|
/**
|
|
3536
3563
|
* A SEND-BACK'S PROOFS are checked against this work's own changes (`qa-feedback.ts`): the files changed
|
|
3537
3564
|
* from the merge base with the base branch to HEAD, read at this tree. Read only for a send-back; null
|
|
@@ -3686,13 +3713,60 @@ async function runLoop(opts) {
|
|
|
3686
3713
|
])),
|
|
3687
3714
|
};
|
|
3688
3715
|
}
|
|
3689
|
-
|
|
3716
|
+
if (confirmed.ok)
|
|
3717
|
+
return { ok: true };
|
|
3718
|
+
return confirmed.nothingDelivered === true
|
|
3719
|
+
? { ok: false, reason: confirmed.because, nothingDelivered: true }
|
|
3720
|
+
: { ok: false, reason: confirmed.because };
|
|
3690
3721
|
},
|
|
3722
|
+
/**
|
|
3723
|
+
* KEY 2 FOR A GOAL THAT HAD NOTHING TO DO (`goal-already-met.ts`): the check's pointers exist here, this
|
|
3724
|
+
* commit is in the remote's base branch, and the gates — run now, with the pointed-at files as the changed
|
|
3725
|
+
* paths — pass every required step. Never asked for a carried commit: that is somebody's delivered work.
|
|
3726
|
+
*/
|
|
3727
|
+
...(judged.kind === 'carried'
|
|
3728
|
+
? {}
|
|
3729
|
+
: {
|
|
3730
|
+
confirmAlreadyMet: async (head, where) => {
|
|
3731
|
+
const outcome = await (0, goal_already_met_1.confirmAlreadyMet)(head, where, {
|
|
3732
|
+
readFile: (0, bug_repro_1.checkoutReader)(cwd),
|
|
3733
|
+
baseRef: async () => {
|
|
3734
|
+
const local = (await (0, run_base_2.resolveBaseBranch)(git, config.run.baseBranch).catch(() => null))?.ref ?? null;
|
|
3735
|
+
return local === null ? null : (0, parts_attribution_1.originBaseOf)(git, local);
|
|
3736
|
+
},
|
|
3737
|
+
isAncestor: (a, of) => git.isAncestor(a, of),
|
|
3738
|
+
runGates: async (paths) => {
|
|
3739
|
+
log('goal : nothing needed changing — running the gates at the current tree to check the code is sound as it is');
|
|
3740
|
+
const rebuilt = workspaceBuilds.before();
|
|
3741
|
+
const gate = await (0, gate_1.runGate)({ steps: [...rebuilt, ...config.gates], changedPaths: [...paths], runner: gateRunnerHere(true) });
|
|
3742
|
+
if (rebuilt.length > 0)
|
|
3743
|
+
workspaceBuilds.after(gate.steps);
|
|
3744
|
+
return { steps: gate.steps, blocked: gate.verdict === 'blocked' };
|
|
3745
|
+
},
|
|
3746
|
+
requiredSteps: (0, effective_gates_1.deliveryRequired)(config.gates),
|
|
3747
|
+
});
|
|
3748
|
+
log(`goal : ${outcome.ok ? `already in the code (${outcome.where.join(', ')}), and the gates pass as it is` : `not shown to be already in the code — ${outcome.reason}`}`);
|
|
3749
|
+
return outcome.ok
|
|
3750
|
+
? { ok: true }
|
|
3751
|
+
: outcome.unknown === true
|
|
3752
|
+
? { ok: false, reason: outcome.reason, unknown: true }
|
|
3753
|
+
: { ok: false, reason: outcome.reason };
|
|
3754
|
+
},
|
|
3755
|
+
}),
|
|
3691
3756
|
stillAuthoritative: () => freshAuthority(goalId, bound.version, bound.text),
|
|
3692
3757
|
});
|
|
3693
3758
|
// M3-2: the adaptive plan's answer is checked and recorded the same way; a plan
|
|
3694
3759
|
// with every step refused is no decision, not an empty revision.
|
|
3695
3760
|
let adaptiveChecked = null;
|
|
3761
|
+
/**
|
|
3762
|
+
* The earlier answers this goal version relied on before now — an incomplete check's (kept below when it plans)
|
|
3763
|
+
* and the bug reproduction's — said with the delivery or the ending, like a met check's own (`carryUsed`).
|
|
3764
|
+
*/
|
|
3765
|
+
if (adaptive.kind === 'planned' && adaptive.used !== undefined)
|
|
3766
|
+
(0, earlier_answers_cache_1.rememberUsedAnswers)(projectStateDirPath, scope.goalId, bound.version, adaptive.used);
|
|
3767
|
+
adaptive = (0, goal_adaptive_1.carryUsed)(adaptive, [...(0, earlier_answers_cache_1.usedAnswersFor)(projectStateDirPath, scope.goalId, bound.version), ...(reproFor(scope.goalId, bound.version)?.used ?? [])]);
|
|
3768
|
+
for (const u of adaptive.kind === 'planned' ? (adaptive.used ?? []) : [])
|
|
3769
|
+
log(`goal : ${u}`);
|
|
3696
3770
|
// What the goal check said is missing, in the run log — it was written nowhere (`gapLogLines`).
|
|
3697
3771
|
if (adaptive.kind === 'planned' || adaptive.kind === 'budget-exhausted')
|
|
3698
3772
|
for (const l of (0, goal_adaptive_1.gapLogLines)(adaptive.gaps))
|
|
@@ -4008,9 +4082,13 @@ async function runLoop(opts) {
|
|
|
4008
4082
|
: kept === null
|
|
4009
4083
|
? adaptive.parts.filter((p) => !p.met).map((p) => p.ref)
|
|
4010
4084
|
: (0, core_4.partsHeldBy)(adaptive.parts, kept);
|
|
4085
|
+
// A split's release order travels as DATA beside its sentence (core `releaseOrderIds`): the daemon sends it with
|
|
4086
|
+
// the part's delivery, so AutoRyn ships the repositories in that order without reading it out of the words.
|
|
4011
4087
|
const delivery = delivered !== undefined && adaptive.kind === 'partly-met'
|
|
4012
4088
|
? { ...delivered, parts: adaptive.parts, ...(heldBy === null ? {} : { partsHeldBy: heldBy }) }
|
|
4013
|
-
: delivered
|
|
4089
|
+
: delivered !== undefined && adaptive.kind === 'sibling-required'
|
|
4090
|
+
? { ...delivered, split: { releaseOrder: adaptive.releaseOrder, siblings: adaptive.siblings.map((s) => s.projectId) } }
|
|
4091
|
+
: delivered;
|
|
4014
4092
|
await releaseHold();
|
|
4015
4093
|
// The branch the controller will ask the lane about: the one that delivered (F20).
|
|
4016
4094
|
const refusedOn = deliveredOn;
|
|
@@ -4630,6 +4708,14 @@ async function runLoop(opts) {
|
|
|
4630
4708
|
}
|
|
4631
4709
|
if (record.state === 'red') {
|
|
4632
4710
|
const why = (0, gate_health_1.redBaseReason)(record);
|
|
4711
|
+
/**
|
|
4712
|
+
* 🔴 A GOAL WHOSE WORK IS THE RED BASE IS NOT HELD BY IT (`redBaseLetsGoalRun`, `gate-health.ts`). It runs, with
|
|
4713
|
+
* nothing left out: its rounds pass when the checks pass, which is the fix.
|
|
4714
|
+
*/
|
|
4715
|
+
if ((0, gate_health_1.redBaseLetsGoalRun)(record, binding.kind === 'bound' ? binding.goal.maintenance?.kind : null)) {
|
|
4716
|
+
log(`base : ${why.replace(/ — the base is red, so the environment is unavailable, not the change$/, '')} — this goal is the fix for it, so it goes ahead`);
|
|
4717
|
+
return { ok: true };
|
|
4718
|
+
}
|
|
4633
4719
|
log(`base : ${why}`);
|
|
4634
4720
|
return { ok: false, because: why };
|
|
4635
4721
|
}
|