@sdd-method/sdd-cli 0.110.2 → 0.111.0

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/scripts/README.md CHANGED
@@ -1,10 +1,17 @@
1
1
  # Bundled upstream scripts
2
2
 
3
- Frozen copies of bash scripts from
4
- [`sdd-method`](https://github.com/tomfosteruk/sdd-method) that
5
- `sdd-cli` either shells out to (`validate-*`) or retains as a regression
6
- oracle (`sync-method-baseline.sh`, which is superseded by native TypeScript
7
- sync in v0.2.0 but kept so `tests/parity/` can keep catching drift).
3
+ Copies of bash scripts from
4
+ [`sdd-method`](https://github.com/tomfosteruk/sdd-method) that `sdd-cli` shells
5
+ out to at runtime (`validate-*`). These SHIP in the npm package, because the
6
+ `sdd-cli validate` dispatcher spawns them.
7
+
8
+ ⚠ `sync-method-baseline.sh` is no longer here. It was never shelled out to — it is
9
+ a parity oracle — and it now lives at `tests/parity/fixtures/`, which is where its
10
+ only consumer is and, crucially, is not published. While it sat in this directory it
11
+ shipped to adopters, and it had drifted 386 lines behind upstream: it wrote a lock
12
+ with a single bundle entry, which would have dropped every other bundle's entry on
13
+ the 97-of-105 adopter locks that are multi-bundle. Adopters receive the
14
+ authoritative script in `platform-baseline`; nothing needed a copy here.
8
15
 
9
16
  Files in this directory are **byte-identical** to their upstream source. Do
10
17
  not edit here — edit upstream, then run the refresh procedure below to copy
@@ -15,7 +22,6 @@ signal.
15
22
 
16
23
  | File | Upstream path | Pinned to |
17
24
  |---|---|---|
18
- | `sync-method-baseline.sh` | `orchestration/scripts/sync-method-baseline.sh` | `4d80826` |
19
25
  | `validate-app-docs.sh` | `orchestration/scripts/validate-app-docs.sh` | `db4cb25` |
20
26
  | `validate-app-dependencies.sh` | `orchestration/scripts/validate-app-dependencies.sh` | `db4cb25` |
21
27
  | `validate-integration-docs.sh` | `orchestration/scripts/validate-integration-docs.sh` | `db4cb25` |
@@ -34,14 +40,24 @@ cp ../sdd-method/orchestration/scripts/<script>.sh scripts/
34
40
  # Then update the SHA in this README and commit both together.
35
41
  ```
36
42
 
37
- Automation (pre-build sync step) is a later milestone. Refresh is currently
38
- manual and visible.
43
+ Still manual for the validators. **Manual-and-visible turned out to be
44
+ manual-and-invisible**: this README mandated byte-identity ("do not edit here …
45
+ byte-identity keeps `diff` usable as a drift-detection signal") while its Lifecycle
46
+ section simultaneously described the sync oracle as "frozen at 4a8cd05" — and the
47
+ provenance table pinned a *different* commit. Either reading was defensible, so a
48
+ 386-line drift looked intentional to anyone who checked. The parity oracle now has
49
+ the automation this section called "a later milestone":
50
+ `scripts/sync-vendored-script.sh` plus `tests/parity/vendored-script-drift.test.ts`,
51
+ which fails with a re-sync instruction when the copies differ. The validators here
52
+ still have no such guard.
39
53
 
40
54
  ## Lifecycle
41
55
 
42
- The `sync-method-baseline.sh` oracle is frozen at 4a8cd05 and stays for
43
- regression testing the native TS sync is tested against it in
44
- `tests/parity/`.
56
+ The `sync-method-baseline.sh` oracle stays for regression testing the native TS
57
+ sync is compared against it in `tests/parity/` — but it is tracked at upstream HEAD,
58
+ not frozen. Frozen was the wrong model: parity against a frozen oracle stops testing
59
+ the CLI against what adopters run and starts testing it against history, which is how
60
+ a real functional gap (the CLI not applying ADR transitions) stayed invisible.
45
61
 
46
62
  The `validate-*.sh` scripts are what `sdd-cli validate` spawns. Native TS
47
63
  reimplementation of individual validators is v0.3.0+, smallest-first
@@ -3,12 +3,13 @@
3
3
  # vendored copy. Mirrors scripts/sync-canonical-schema.sh: direction of truth is
4
4
  # one-way, sdd-method -> vendored, and the vendored copy is never hand-edited.
5
5
  #
6
- # The vendored copy matters twice over: the parity suite compares sdd-cli against
7
- # it, and it ships in the npm package (`files` includes `scripts`), so an adopter
8
- # can invoke it from node_modules. It once fell 386 lines behind and, among other
9
- # losses, wrote a lock with a single bundle entry dropping every other bundle's
10
- # entry, on an estate where 97 of 105 locks are multi-bundle. Because parity
11
- # compared against the stale copy, nothing caught it.
6
+ # The fixture lives under tests/parity/fixtures/ because that is its only purpose.
7
+ # It used to sit in scripts/, which ships in the npm package, so an adopter could
8
+ # invoke a stale sync script from node_modules and it had fallen 386 lines behind,
9
+ # writing a lock with a single bundle entry and dropping every other bundle's, on an
10
+ # estate where 97 of 105 locks are multi-bundle. Because parity compared against that
11
+ # stale copy, nothing caught it. Adopters receive the authoritative script in
12
+ # platform-baseline; nothing needs a copy here except the parity comparison.
12
13
  #
13
14
  # Usage:
14
15
  # scripts/sync-vendored-script.sh # from $SDD_METHOD_PATH or ~/Projects/method/sdd-method
@@ -21,7 +22,7 @@ set -euo pipefail
21
22
 
22
23
  SDD_METHOD_PATH="${1:-${SDD_METHOD_PATH:-$HOME/Projects/method/sdd-method}}"
23
24
  SOURCE="$SDD_METHOD_PATH/orchestration/scripts/sync-method-baseline.sh"
24
- DEST="$(dirname "$0")/sync-method-baseline.sh"
25
+ DEST="$(dirname "$0")/../tests/parity/fixtures/sync-method-baseline.sh"
25
26
 
26
27
  if [[ ! -f "$SOURCE" ]]; then
27
28
  echo "ERROR: authoritative script not found at $SOURCE" >&2