You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(skills/update-stack): drop ledger condition + auto-derive scan list (#3778)
* feat(skills/update-stack): drop ledger condition + auto-derive scan list (#3777)
Two coupled changes to step 3ter drift gate:
1. Drop `DOWNSTREAM_PATCHES.md` ledger exception — block on ANY shared
non-test file divergence vs `devkit-node/master`. User decision
2026-06-02 (memory `feedback_no_dev_in_shared_modules`): drift in
shared files must never happen, not be documented. Resolution path
becomes revert / promote-up / relocate.
2. Replace hardcoded module list (`modules/home auth users tasks uploads
billing lib config/defaults`) with `modules lib config`. Old enum
silently missed `modules/audit`, `modules/core`, `modules/organizations`.
Re-audit on trawl_node with corrected scan surfaced 1 undeclared drift
(`modules/core/doc/index.yml`).
Mirrors infra#37 (PRF Phase 0.5 gate) for `/update-stack`-time enforcement.
* docs(skills/update-stack): address Copilot review (#3778)
- Rewrite Phase 1 'Stack modules' line to point at auto-discovery (no
hardcoded enumeration that drifts with new modules).
- Rewrite 3bis 'stack code' line same way.
- Tighten test-files exclusion description to match the actual regex
(paths containing /tests/ or /__tests__/; *.test.{js,jsx,ts,tsx} /
*.spec.{js,jsx,ts,tsx}). The previous '/tests*/' wording was sloppy.
Stack scope = every file under `modules/`, `lib/`, `config/` (defaults, templates, assets) that exists in `devkit-node/master`. Auto-discovered by the step 3ter gate; do not enumerate by hand.
21
21
22
22
### 1. Setup remote + merge
23
23
@@ -60,7 +60,7 @@ Failures typically indicate regressions from conflict resolution — fix these b
60
60
61
61
### 3bis. Report stack issues
62
62
63
-
If `/verify` failures originate from **stack module code** (`home`, `auth`, `users`, `tasks`, `uploads`) or **stack core** (`lib/`, `config/defaults/`) and not from conflict resolution mistakes, open a GitHub issue on `pierreb-devkit/Node`.
63
+
If `/verify` failures originate from a **stack file** (any file under `modules/`, `lib/`, or `config/` present in `devkit-node/master`) and not from conflict resolution mistakes, open a GitHub issue on `pierreb-devkit/Node`.
64
64
65
65
**How to determine the failure origin:**
66
66
-**Stack code failure:** error occurs in unmodified stack module files (resolved with `--theirs`)
@@ -88,9 +88,9 @@ BODY
88
88
89
89
Proceed to Phase 2 and track the upstream fix separately — do not block downstream alignment on it.
90
90
91
-
### 3ter. Block on undeclared drift
91
+
### 3ter. Block on drift
92
92
93
-
After `/verify` passes, run a final diff sweep before starting Phase 2. Any stack file that diverges from upstream **and** is not declared in `DOWNSTREAM_PATCHES.md` blocks the flow.
93
+
After `/verify` passes, run a final diff sweep before starting Phase 2. Any shared non-test stack file that diverges from upstream blocks the flow. No ledger exception (user decision 2026-06-02 — drift must never happen, not be documented).
-Missing `DOWNSTREAM_PATCHES.md`= no declared divergences allowed (treat as empty).
120
-
-Declare diverging paths in `DOWNSTREAM_PATCHES.md` as `'path/to/file'` (single-quoted) — the gate matches on the quoted token to avoid substring collisions.
121
-
-Downstream-only files (new modules, helpers, lib additions) are not scanned — the sweep only covers the stack directories listed above.
118
+
-Block on ANY shared-file divergence. No "declare and skip" path — the `DOWNSTREAM_PATCHES.md`ledger model was abandoned 2026-06-02 (memory `feedback_no_dev_in_shared_modules`).
119
+
-Scan covers the full stack tree (`modules`, `lib`, `config`) — auto-discovers every shared module. Per-file `git ls-tree` on upstream filters downstream-only files.
120
+
-Test files (paths containing `/tests/` or `/__tests__/`, or filenames ending `.test.{js,jsx,ts,tsx}` / `.spec.{js,jsx,ts,tsx}`) are excluded — downstream test adaptations are acceptable.
122
121
- This gate runs **after**`/verify` (never blocks on transient verify failures) and **before** Phase 2 (failure is recoverable — no merge commit yet).
123
122
- Ref: plan `2026-05-30-trawl-devkit-perfect-alignment.md` Tasks E.1 + E.2.
0 commit comments