muse-crew 0.14.4 → 0.14.5
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/AGENTS.md +1 -1
- package/docs/decisions/publish-path.md +53 -0
- package/docs/guide.md +2 -2
- package/docs/publish-unknown-recovery.md +10 -3
- package/docs/publish-verification.md +117 -61
- package/docs/release-integrity.md +5 -3
- package/docs/reviews/critic-0145.md +106 -0
- package/lib/AGENTS.md +2 -1
- package/lib/check-intent-freshness.js +101 -0
- package/lib/compute-publish-diff.js +34 -13
- package/lib/crew-api.js +437 -18
- package/lib/publish-note-vocabulary.js +20 -0
- package/lib/retry-publish.js +45 -33
- package/lib/verify-publish.js +11 -9
- package/package.json +1 -1
- package/seed/cron-body-template.md +50 -16
- package/workflows/bugfix.js +96 -627
- package/workflows/chore.js +96 -627
- package/workflows/crew-dispatch.js +36 -0
- package/workflows/standard.js +104 -636
|
@@ -50,6 +50,42 @@ const MAX_TASKS_PER_POLL = inputs.maxTasksPerPoll || 6;
|
|
|
50
50
|
// inputs.registry. Fall back to the agent() load only when the caller
|
|
51
51
|
// predates the registry — slow, but never broken.
|
|
52
52
|
var registryResult = inputs.registry;
|
|
53
|
+
// Nested-registry seam (2026-09-20): a malformed nested registry object
|
|
54
|
+
// (e.g. a workflow key mapping to null/undefined, or a steps entry without
|
|
55
|
+
// a name) used to die deep in the lookup tables with a cryptic TypeError
|
|
56
|
+
// ("cannot convert 'null' or 'undefined' to object"). Validate the shape
|
|
57
|
+
// deterministically first; a malformed registry falls back to the slow
|
|
58
|
+
// agent load with a loud log, exactly like a missing one — the defect is
|
|
59
|
+
// named, never a crash.
|
|
60
|
+
function validateRegistry(reg) {
|
|
61
|
+
var wfNames = ["standard", "bugfix", "chore", "docs", "upgrade"];
|
|
62
|
+
if (!reg || typeof reg !== "object" || Array.isArray(reg)) {
|
|
63
|
+
return { ok: false, reason: "registry is missing or not an object" };
|
|
64
|
+
}
|
|
65
|
+
for (var i = 0; i < wfNames.length; i++) {
|
|
66
|
+
var wf = reg[wfNames[i]];
|
|
67
|
+
if (!wf || typeof wf !== "object") {
|
|
68
|
+
return { ok: false, reason: "workflow '" + wfNames[i] + "' is missing or not an object" };
|
|
69
|
+
}
|
|
70
|
+
if (!Array.isArray(wf.steps)) {
|
|
71
|
+
return { ok: false, reason: "workflow '" + wfNames[i] + "' has no steps array" };
|
|
72
|
+
}
|
|
73
|
+
for (var j = 0; j < wf.steps.length; j++) {
|
|
74
|
+
if (!wf.steps[j] || typeof wf.steps[j].name !== "string") {
|
|
75
|
+
return { ok: false, reason: "workflow '" + wfNames[i] + "' step " + j + " has no name" };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (typeof wf.reworkTarget !== "string") {
|
|
79
|
+
return { ok: false, reason: "workflow '" + wfNames[i] + "' has no reworkTarget string" };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return { ok: true };
|
|
83
|
+
}
|
|
84
|
+
var registryCheck = validateRegistry(registryResult);
|
|
85
|
+
if (!registryCheck.ok) {
|
|
86
|
+
log("WARNING: registry failed shape validation (" + registryCheck.reason + ") — falling back to slow registry load");
|
|
87
|
+
registryResult = null;
|
|
88
|
+
}
|
|
53
89
|
if (!registryResult) {
|
|
54
90
|
log("WARNING: no registry in args — falling back to slow registry load");
|
|
55
91
|
registryResult = await agent(
|