valent-pipeline 0.19.64 → 0.19.66
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
|
@@ -85,6 +85,8 @@ For each NFR-sensitive path: `[NFR-PERF]` response time + load patterns; `[NFR-S
|
|
|
85
85
|
- If `ui` in `{testing_profiles}` → **MANDATORY.** Read `uxa-spec.md`. If `uxa-spec.md` is missing, write `status: blocked` to your frontmatter — do NOT proceed without it. For each page state define: Checkpoint ID (VV-{NNN}), Page/Route, State (Default/Loading/Empty/Error/Success or custom), AC Reference, Area labels in scope, Screenshot filename (`{story_id}_VV-{NNN}_{page}_{state}.png`), Expected visual elements, Setup instructions, Pass criteria. Write to `{story_output_dir}/visual-validation-checklist.md`.
|
|
86
86
|
- If `ui` NOT in `{testing_profiles}` → skip, note "N/A — no UI profile."
|
|
87
87
|
|
|
88
|
+
**The reach step must use the app's ACTUAL navigation mechanism — never assume a URL route exists.** Read `uxa-spec.md` for HOW each screen is reached, then match the checklist to it. A **URL-routed** screen (a server route or a real client router maps a path → screen) takes a URL-nav reach step. A **store-driven / client-side-nav** screen does NOT: a single-page app mounts views from application state (e.g. app-root renders the in-career screen at `loadingState === 'active'`) with NO URL router, so a URL-nav to a path like `/game` SILENTLY drops to the default view (login) → the screen never mounts → the gate records 0/N checkpoints → a **false visual:fail that reads as a code defect** (and costs a full reject + re-run — Epic-3 3.4). For a store-driven screen the reach step MUST drive the real nav: run the user flow that produces the state (register → login → Start Career → `active`) OR inject the documented store state (`window.__<store>__`) at the verified DPR — never a URL-nav. Confirm the app's nav model BEFORE writing any `Page / Route` + `Setup Instructions`; if the app has no URL router, author NO URL-route reach steps. This is the reach-step analogue of the Step 6b reachability contract: the screen must be genuinely reachable by the mechanism the checklist drives, or the gate measures nothing.
|
|
89
|
+
|
|
88
90
|
**Sanctioning a checkpoint `N/A (sanction)` — the visual gate covers browser-testable *static renders* only.** The PMCP visual gate drives a **stateless** browser-automation MCP: it can navigate, snapshot, and assert rendered DOM, but it CANNOT drive a persistent WebSocket event (`career.created`, `career.resumed`), sever a connection mid-session, or catch an in-flight transient. A checkpoint whose pass criteria *require* such a flow will false-FAIL the visual gate even when the feature works. For exactly those checkpoints, set the checklist's **`N/A (sanction)`** field to `yes — <rationale>`, where the rationale (a) states why the browser MCP cannot drive it and (b) **names the acceptance/integration test that DOES validate it** — that test MUST exist; an `na` with no validating test is a coverage hole, not a sanction. PMCP then records the checkpoint N/A (not FAIL) and JUDGE treats it as non-blocking. Keep every browser-testable static render (default/empty/error/success states, element presence, layout) as a normal PASS/FAIL checkpoint — only WS-event-driven / non-render flows are eligible. When in doubt, do NOT sanction: a real render that fails must stay a FAIL.
|
|
89
91
|
|
|
90
92
|
**The validating test a WS-driven sanction names MUST be a true end-to-end reachability case — never a service-layer test that bypasses the live event path.** When the UXA spec carries a Step 6b reachability contract for a WS-driven screen, author a REQUIRED `e2e` acceptance case that **drives the real triggering event over the actual connection** (register/login → issue the WS command → assert the screen leaves loading and renders), then sanction the matching visual checkpoint to it. A test that calls the service/handler layer directly (e.g. asserts `POST /api/careers` or the service method) can pass green while the **live WS command path is structurally broken** — a missing initial-state push, or a bootstrap command that violates a pre-event invariant (writing an FK row keyed on an id that does not exist until the event lands). That gap stays invisible until the visual gate a full attempt later. The reachability case is what forces the live path; the service-layer test is necessary but NOT sufficient to back a sanction.
|
|
@@ -39,7 +39,7 @@ blockers: []
|
|
|
39
39
|
| Field | Value |
|
|
40
40
|
|-------|-------|
|
|
41
41
|
| **Checkpoint ID** | VV-{NNN} |
|
|
42
|
-
| **Page / Route** | {page name
|
|
42
|
+
| **Page / Route** | {page name + how it is REACHED. A URL path ONLY if the app is genuinely URL-routed, e.g. Registration / /register. For a store-driven / client-side-nav SPA with no URL router, name the nav mechanism instead — e.g. "Office / reached via in-career flow (Start Career → active), NO URL route" — never a path that 404s to the default view} |
|
|
43
43
|
| **State** | {Default \| Loading \| Empty \| Error \| Success \| custom state description} |
|
|
44
44
|
| **AC Reference** | {AC-ID from qa-test-spec.md, e.g. AC-1} |
|
|
45
45
|
| **Area Labels in Scope** | {list of area labels from uxa-spec.md that should be visible in this state} |
|
|
@@ -51,7 +51,7 @@ blockers: []
|
|
|
51
51
|
- {element}: {expected appearance, position, or content}
|
|
52
52
|
|
|
53
53
|
**Setup Instructions:**
|
|
54
|
-
- {preconditions PMCP must establish before capturing -- e.g. seed data, auth state, form values}
|
|
54
|
+
- {preconditions PMCP must establish before capturing -- e.g. seed data, auth state, form values; for a store-driven-nav screen, the EXACT steps to REACH it (drive the user flow or inject the documented store) — never assume a URL-nav lands on it}
|
|
55
55
|
|
|
56
56
|
**Pass Criteria:**
|
|
57
57
|
- {what PMCP must verify in the screenshot to mark this checkpoint as pass}
|
package/src/lib/git-flow.js
CHANGED
|
@@ -167,6 +167,42 @@ function isMergedInto(root, branch, target) {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
// RESUME-path backlog refresh (M-208). The create-path sync (startStory, the `merge --no-ff target`
|
|
171
|
+
// below) fires ONLY on create — never on a RESUME, because a full merge there would move HEAD past the
|
|
172
|
+
// critic pin (the documented constraint at the create-path guard). But a --from-story bug-fix branch
|
|
173
|
+
// can still END UP missing the target-filed bug entry across a resume: if the entry is filed to the
|
|
174
|
+
// target AFTER the branch is cut (the rejecting sprint's rollover-persist lands ~seconds after the
|
|
175
|
+
// branch base, or the create launch dies before the entry exists) and the run then RESUMES the branch,
|
|
176
|
+
// the create refresh never re-runs → `backlog ship --story <bug>` errors "backlog item not found"
|
|
177
|
+
// (3.5-BUG-001, the M-36/M-65 class on the resume surface). Bring ONLY the target-canonical backlog
|
|
178
|
+
// forward — a single path-scoped chore commit, NOT a merge — so the entry arrives while the pin and all
|
|
179
|
+
// code stay exactly put (the backlog is already target-wins on every merge, REFRESH_TARGET_WINS). A
|
|
180
|
+
// no-op when the branch backlog already matches the target (the create refresh delivered it, or nothing
|
|
181
|
+
// was filed) so a resume never churns an empty commit; gated to inline --from-story fixes (basedOnStory)
|
|
182
|
+
// whose target genuinely advanced, mirroring the create-path guard.
|
|
183
|
+
function syncBacklogFromTargetOnResume(gitDir, root, story, target) {
|
|
184
|
+
const backlogFile = 'pipeline-backlog.yaml';
|
|
185
|
+
try {
|
|
186
|
+
if (!target || !branchExists(root, target)) return false;
|
|
187
|
+
const rec = readFlowRecord(gitDir, story) || readFlowRecord(root, story);
|
|
188
|
+
if (!rec || !rec.basedOnStory) return false; // only inline bug fixes need this
|
|
189
|
+
if (mergeInProgress(gitDir)) return false; // never touch a half-merged tree
|
|
190
|
+
const branch = rec.branch || currentBranch(gitDir);
|
|
191
|
+
if (!branch || isMergedInto(root, target, branch)) return false; // target not ahead → nothing to inherit
|
|
192
|
+
git(gitDir, ['checkout', target, '--', backlogFile]); // stage the target's canonical backlog blob
|
|
193
|
+
const staged = git(gitDir, ['diff', '--cached', '--name-only'])
|
|
194
|
+
.split('\n').map((s) => s.trim()).filter(Boolean);
|
|
195
|
+
if (!staged.includes(backlogFile)) return false; // already current → no empty commit
|
|
196
|
+
git(gitDir, ['commit', '-m',
|
|
197
|
+
buildCommitMessage({ storyId: story, phase: 'sync',
|
|
198
|
+
summary: `inherit target backlog (filed bug entries) on resume — no code merge, pin intact (M-208)` }),
|
|
199
|
+
'--', backlogFile]);
|
|
200
|
+
return true;
|
|
201
|
+
} catch {
|
|
202
|
+
return false; // best-effort: a sync failure leaves the branch as it was (degraded, not wedged)
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
170
206
|
// --- worktree mode (parallel story execution) -------------------------------------------------
|
|
171
207
|
// Each parallel story gets its own worktree under `<root>/<worktreeDir>/<storyId>` with the story
|
|
172
208
|
// branch checked out there; the MAIN checkout stays on the target branch and is the only place
|
|
@@ -470,7 +506,10 @@ export function startStory({ root, story, targetBranch = '', prefix = 'story/',
|
|
|
470
506
|
const onBranch = currentBranch(root);
|
|
471
507
|
|
|
472
508
|
if (!worktree && onBranch === branch) {
|
|
473
|
-
|
|
509
|
+
const rec = readFlowRecord(root, story);
|
|
510
|
+
const backlogResynced = syncBacklogFromTargetOnResume(root, root, story, rec?.target);
|
|
511
|
+
return { branch, base: rec?.base ?? null, created: false, resumed: true,
|
|
512
|
+
...(backlogResynced ? { backlogResynced: true } : {}) };
|
|
474
513
|
}
|
|
475
514
|
|
|
476
515
|
// Leftover dirt belongs to whatever produced it (planning artifacts, a prior crash) — sweep it
|
|
@@ -516,7 +555,10 @@ export function startStory({ root, story, targetBranch = '', prefix = 'story/',
|
|
|
516
555
|
// when intact, and a half-created worktree (crash between `worktree add` and setup) gets
|
|
517
556
|
// its missing pieces — setup_commands must therefore be idempotent (documented).
|
|
518
557
|
const setup = setupWorktree(root, existing, setupCommands);
|
|
519
|
-
|
|
558
|
+
const rec = readFlowRecord(existing, story) || readFlowRecord(root, story);
|
|
559
|
+
const backlogResynced = syncBacklogFromTargetOnResume(existing, root, story, rec?.target);
|
|
560
|
+
return { branch, base: rec?.base ?? null, worktree: existing, created: false, resumed: true, snapshotSha,
|
|
561
|
+
...(backlogResynced ? { backlogResynced: true } : {}), ...setup };
|
|
520
562
|
}
|
|
521
563
|
const creating = !branchExists(root, branch);
|
|
522
564
|
if (creating) {
|
|
@@ -586,7 +628,10 @@ export function startStory({ root, story, targetBranch = '', prefix = 'story/',
|
|
|
586
628
|
|
|
587
629
|
if (branchExists(root, branch)) {
|
|
588
630
|
git(root, ['checkout', branch]);
|
|
589
|
-
|
|
631
|
+
const rec = readFlowRecord(root, story);
|
|
632
|
+
const backlogResynced = syncBacklogFromTargetOnResume(root, root, story, rec?.target);
|
|
633
|
+
return { branch, base: rec?.base ?? null, created: false, resumed: true, snapshotSha,
|
|
634
|
+
...(backlogResynced ? { backlogResynced: true } : {}) };
|
|
590
635
|
}
|
|
591
636
|
if (!branchExists(root, base)) throw new Error(`base branch "${base}" does not exist`);
|
|
592
637
|
|