pi-aia-asf 0.13.2 → 0.13.4

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/CHANGELOG.md CHANGED
@@ -7,6 +7,95 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.13.4] - 2026-10-16
11
+
12
+ ### Fixed
13
+
14
+ - **The model-blind-spot research (D1/D2) could not be verified against its own
15
+ sources, and now it can.** Both deliverables existed; neither had been audited,
16
+ and the audit found three real problems.
17
+ - **Seven quotations attributed to unnamed sources were removed.** The document
18
+ leaned on block quotes from "a soft-delete design guide", "the tenancy
19
+ source", "a team that learned it the expensive way" and the BEA book — none
20
+ carrying a URL. Checked by exact-phrase search and by fetching the cited
21
+ URLs: `orphans-by-policy`, `humans forget filters … RLS policies forget
22
+ nothing` and `we paid for the trash folder twice` return **zero results**,
23
+ and the InfoQ and O'Reilly fitness-function URLs return **404**. An
24
+ unfindable quotation is worse than no citation — it reads as evidence and
25
+ invites downstream reuse — so each was deleted, and the claims that still
26
+ matter were restated as explicitly-labelled **T3** reasoning. Where a primary
27
+ source says it better, it replaced the paraphrase: the PostgreSQL manual's own
28
+ default-deny text is stronger and checkable than the quote it replaced.
29
+ The deletions are listed in a withdrawn table rather than dropped silently.
30
+ - **What remains is now genuinely T1** — fetched and read this pass, with URLs
31
+ and page numbers: Vernon's four aggregate rules (ArchiLab, ch. 10 pp.
32
+ 347–388), the OWASP IDOR methodology, PostgreSQL §5.9, the Thoughtworks
33
+ fitness-function article. `SOURCES.md` gained the Model section with T1/T2/T3
34
+ classes per 02-research.md, including a row that admits the Rails `dependent:`
35
+ option list was **not** read and must be checked before any option name
36
+ reaches normative text.
37
+ - **The inventory had gone stale.** It was measured against `06a–06i` and never
38
+ re-derived after `06j`, `06k`, the gate layer and the model fitness level
39
+ shipped — so it still claimed all 14 classes were invisible. Re-scored against
40
+ the current gate set with the H/M/S enforcement classes: six classes (3
41
+ concurrency, 5 time, 6 numeric/unit, 7 locale, 9 unit-of-work, 12 environment)
42
+ remain **completely uninspected**, and that is now stated as a count instead of
43
+ a mood.
44
+ - **The audit covered only half the mandate.** The spec says "ASF **and
45
+ vigilant**"; vigilant had never been audited. It now has its own table — Loop
46
+ Guardian, spec verification, completeness guard, obligations container,
47
+ tool-timeout abort — and the honest conclusion: vigilant inspects the agent and
48
+ the claim, not the deliverable's design, and by the package boundary it must.
49
+ So for those six classes, **if ASF does not inspect them, nobody does.** There
50
+ is no second line of defence in the other package.
51
+ - **The meta-finding got a status.** "Not one gate asserts the non-effect" was
52
+ written before 06g §3 added non-effect assertions; it now reports itself as
53
+ half-closed — the language exists, the compulsion exists only where a blocker
54
+ was built.
55
+ - **`test/test-model-research.mjs` (42 checks) guards all of the above**, because
56
+ the failure mode is recurrence rather than novelty: it asserts the inventory is
57
+ contiguous and fully re-scored, that vigilant is audited, that every sourced
58
+ subsection resolves to a URL or is labelled T3, and that each withdrawn phrase
59
+ survives only as a record and never as a quotation. **Negative control verified**
60
+ — injecting an unattributed quote back into §2.6 makes it fail, and removing it
61
+ passes.
62
+
63
+ ### Notes
64
+
65
+ - **`npm audit` triage for this line: accepted, not fixed — and the reason is
66
+ recorded rather than skipped.** Three advisories report (1 moderate,
67
+ 2 high), all tracing to `undici` and `brace-expansion`. None of them ships
68
+ with ASF: `dependencies` is `{}` and the packed artifact (50 files) contains
69
+ no `node_modules` and neither package. They are reachable only through the
70
+ **peer** host package `@earendil-works/pi-coding-agent`, which is the user's
71
+ own pi installation and is pinned in `devDependencies` solely so typecheck can
72
+ run against a known host version (`host types 1.2.0`).
73
+ - `npm audit fix` would bump that pin. It was deliberately **not** run: it
74
+ would move the host-types version the entire typecheck and suite are
75
+ calibrated against, for no change whatsoever in what an installed ASF
76
+ contains. The fix belongs to the pi release, not to this manifest.
77
+ - Consequence for anyone reading this: an `npm audit` hit on ASF is a signal
78
+ about your **pi install**, and should be resolved by updating pi. Checking
79
+ the shipped surface is the `dependencies: {}` line plus the pack list above,
80
+ not the audit count.
81
+
82
+ ## [0.13.3] - 2026-10-16
83
+
84
+ ### Fixed
85
+
86
+ - **06j §5 had drifted back into enumerating products.** The section now carries
87
+ the store-agnostic *rule* — the defect is not SQL-shaped, and the distinction
88
+ that makes a hand-written cascade decidable is the **reference** (a row removing
89
+ itself vs one entity deciding the fate of another) — instead of a table of
90
+ store families and a list of ORM dialects. Which dialects the scanner
91
+ recognises is an implementation detail in `lib/code-health/model.mjs`, reported
92
+ per finding so you can see what it looked at; the standard states categories and
93
+ leaves the rest to `model.extraCascadePatterns` /
94
+ `model.extraHandWrittenPatterns`. A recognised dialect is not a coverage
95
+ promise: an unknown persistence shape is a `scanned: 0` you say out loud, not a
96
+ clean bill of health. The fixtures keep naming the concrete dialects — that is
97
+ where a pattern set belongs.
98
+
10
99
  ## [0.13.2] - 2026-10-16
11
100
 
12
101
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-aia-asf",
3
- "version": "0.13.2",
3
+ "version": "0.13.4",
4
4
  "description": "Ai Applied Agentic Software Factory — codifies the full software development flow: intake, research, spec capture, adversarial analysis, planning with approval gates, test-first implementation, and release. Requires pi-vigilant, pi-smart-web-search, pi-smart-fetch, and pi-aia-browser.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -179,36 +179,33 @@ requirement: "is this ownership correct?" is judgment and stays in review, while
179
179
  "does this file declare a cascade with no `asf-model:` tag?" is measurable.
180
180
 
181
181
  **It is a tripwire, not an authority — and it is store-agnostic by design.** The
182
- defect is not SQL-shaped: an instance inheriting its parent's lifecycle happens
182
+ defect is not SQL-shaped. An instance inheriting its parent's lifecycle happens
183
183
  in a relational FK action, in an ORM mapping attribute, in a document store's
184
184
  delete dependency, in a key-value prefix wipe, or in a loop someone wrote to
185
185
  delete children by hand. Three rules run:
186
186
  `undeclared-cascade` (a cascade declaration with no ownership declaration),
187
187
  `delete-then-reinsert` (rebuild-by-delete over one table or collection), and
188
- `handwritten-cascade` — the store-agnostic half, for stores that have **no
189
- constraint to declare the cascade in the first place**:
190
-
191
- | Store family | What the cascade looks like when nobody wrote it down |
192
- |---|---|
193
- | **MongoDB / Mongoose** | `deleteMany({ userId })` over a child collection — no FK action exists, so this code *is* the cascade |
194
- | **Firestore** | a recursive `collectionGroup` / subcollection delete; missing a nested subcollection is the standard failure |
195
- | **DynamoDB** | `DeleteItem` / `BatchWriteItem` driven by a parent key across tables; GSI/LSI are wiped with the table, items are not |
196
- | **CouchDB** | documents selected and marked `_deleted: true` in one `bulkDocs` |
197
- | **Redis** | a key-pattern wipe — `keys('session:<id>:*')` then `del`/`unlink`; the prefix *is* the parent |
198
- | **Elasticsearch** | `deleteByQuery` on a parent field; no referential integrity exists to fall back on |
199
-
200
- ORM-level declarations are matched too — `CascadeType.REMOVE`/`ALL`,
201
- `orphanRemoval = true`, `DeleteBehavior.Cascade`, `onDelete: Cascade`
202
- (Prisma/Sequelize), `on_delete=models.CASCADE` (Django),
203
- `dependent: :destroy` / `:delete_all` (Rails), `cascade = "…delete…"`
204
- (SQLAlchemy) — so the gate is not SQL DDL only.
205
-
206
- A fire here asks for a **declaration**; it does not claim the ownership is
207
- wrong, which stays a judgement in review. A delete of a row by its own identity
208
- (`deleteOne({ _id: id })`) is not a cascade and does not fire — a rule that
209
- fires on ordinary deletes gets switched off, and the coverage goes with it.
210
- Projects add dialects with `model.extraCascadePatterns` and
211
- `model.extraHandWrittenPatterns` rather than waiting for a release.
188
+ `handwritten-cascade` — the shape a cascade takes in a store that has **no
189
+ constraint to declare it in**, where the decision exists only as code someone
190
+ wrote: a multi-delete driven by a reference to *another* entity.
191
+
192
+ The distinction that makes `handwritten-cascade` decidable rather than
193
+ judgemental is the **reference**. `deleteOne({ _id: id })` is a row removing
194
+ itself; `deleteMany({ userId })` is one entity deciding the fate of another. The
195
+ first does not fire — a rule that fires on ordinary deletes gets switched off and
196
+ the coverage goes with it, which is why the near-miss fixtures matter more than
197
+ the fire fixtures. A fire asks for a **declaration**; it does not claim the
198
+ ownership is wrong, and that judgement stays in review.
199
+
200
+ **The pattern set is illustrative and the standard does not enumerate products.**
201
+ The categories above are the standard; the dialects the scanner happens to
202
+ recognise are an implementation detail in `lib/code-health/model.mjs`, reported
203
+ per finding so you can see what it looked at. A project whose store is not in
204
+ that set adds its own spelling with `model.extraCascadePatterns` /
205
+ `model.extraHandWrittenPatterns` rather than waiting for a release — and a
206
+ recognised dialect is not a coverage promise. If your persistence layer speaks a
207
+ shape the scanner does not know, that is a `scanned: 0` you must say out loud,
208
+ not a clean bill of health.
212
209
 
213
210
  **Where the store has no constraint to inspect, the scan has nothing to attach
214
211
  to and the invariant tests below are the only hard gate** — say which of the two