@ikunin/sprintpilot 2.2.0 → 2.2.1
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.
|
@@ -110,8 +110,29 @@ function verify(state, signalOutput, context) {
|
|
|
110
110
|
projectRoot: (context && context.projectRoot) || '.',
|
|
111
111
|
augmented: (context && context.augmented) || null,
|
|
112
112
|
};
|
|
113
|
+
const out = signalOutput || {};
|
|
114
|
+
// Effective state: fall forward to signal.output for identity fields
|
|
115
|
+
// that composeRuntimeState couldn't pre-populate (only story_file_path
|
|
116
|
+
// and ac_summary — story_key + current_epic are already resolved from
|
|
117
|
+
// sprint-status before verify runs). Without this, the FIRST successful
|
|
118
|
+
// CREATE_STORY signal always fails verify with "story_file_path not
|
|
119
|
+
// set" because adapt.advanceState propagates the path AFTER verify, not
|
|
120
|
+
// before.
|
|
121
|
+
//
|
|
122
|
+
// Precedence: state wins when set; signal.output is fallback. This
|
|
123
|
+
// preserves verifyStoryDone's explicit out.story_key !== state.story_key
|
|
124
|
+
// mismatch check at line 273 — that comparison still sees the
|
|
125
|
+
// original state value (which is non-null by STORY_DONE).
|
|
126
|
+
const effectiveState =
|
|
127
|
+
state.story_file_path && state.ac_summary
|
|
128
|
+
? state
|
|
129
|
+
: {
|
|
130
|
+
...state,
|
|
131
|
+
story_file_path: state.story_file_path || out.story_file_path || null,
|
|
132
|
+
ac_summary: state.ac_summary || out.ac_summary || null,
|
|
133
|
+
};
|
|
113
134
|
try {
|
|
114
|
-
return fn(
|
|
135
|
+
return fn(effectiveState, out, ctx);
|
|
115
136
|
} catch (e) {
|
|
116
137
|
return { ok: false, issues: [`verifier threw: ${e.message}`] };
|
|
117
138
|
}
|
package/package.json
CHANGED