toga-ai 1.0.769 → 1.0.770

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.
@@ -709,17 +709,21 @@ non-deterministic, and **can write real data**. Two consequences worth internali
709
709
 
710
710
  **MUST — every new test is SEEN TO FAIL before it is allowed to pass.** A test written straight to
711
711
  green has proven nothing; on a stubbed harness a test can easily pass for the wrong reason. Break
712
- the thing under test on purpose, watch the test go red, then restore it. Two worked examples from
713
- the reference implementation:
714
-
715
- 1. **Intercept matching.** Revert one intercept from `{ pathname: apiPath("domains") }` to the URL
716
- glob `**/v2/domains*` and re-run: the fall-through guard **must** fail and print the URL.
717
- (Real query strings contain a slash — `…SelfDomains.domain:like:http://compass%2Etogasupply)…` —
718
- and minimatch's `*` does not cross `/`, so the glob silently never matches and the catch-all
719
- answers instead.) If the suite stays green, the guard is not wired.
720
- 2. **Config drift canary.** Delete the `isBloxLinked` branch from the component-test Vite config
721
- and re-run the canary spec: it **must** go red with "Invalid hook call" or "No QueryClient set"
722
- (a second copy of React / react-query). If it stays green, the canary is not asserting anything.
712
+ the thing under test on purpose, watch the test go red, then restore it. The two mutations actually
713
+ run against the reference implementation on 2026-09-03, both of which produced the expected red:
714
+
715
+ 1. **Break the config the test reads.** The tenant registry was edited to claim `QUAD` is granted
716
+ `transfer-orders` while its surface fixture still withheld it. The nav test failed with
717
+ `Expected to find element: a[href="/transfer-orders"], but never found it.` — proving the test
718
+ reads the real resolved nav, not the registry it was seeded from.
719
+ 2. **Break the app code the test covers.** `getUserFieldsForClient` was forced to always return the
720
+ `DEFAULT` field list, dropping every role flag. The user-fields test failed with
721
+ `expected 'firstName,lastName,email,uuid' to include '_isAdmin'` — proving it would catch a real
722
+ regression that silently demotes every admin to `USER`.
723
+
724
+ Mutate **the thing under test**, not the harness. Verifying a *guardrail* (e.g. reverting an
725
+ intercept to a URL glob to confirm the fall-through check fires) is a separate and also worthwhile
726
+ exercise, but it proves the guard works — not that any test does.
723
727
 
724
728
  **MUST — every config file is type-checked.** A config that no `tsconfig` includes is compiled by
725
729
  **nothing** and is green by default — the same false-green class as running bare `npx tsc --noEmit`
@@ -781,6 +785,11 @@ Copy from there rather than reinventing.
781
785
 
782
786
  ## Change history
783
787
 
788
+ - 2026-09-03 — §23 correction: replaced the two "seen to fail" worked examples. The first pass
789
+ listed a guardrail check plus an **unverified** component-config mutation; both are now the two
790
+ mutations that were actually run and observed red (a registry/fixture nav mismatch, and forcing
791
+ the `DEFAULT` user field list). Added the distinction that mutating the harness verifies a
792
+ **guard**, not a **test**. (apeterson)
784
793
  - 2026-09-03 — **Front-end testing promoted from an open item to §23 (MUST/SHOULD).** Settles the
785
794
  layering: Vitest + RTL for logic, Cypress **component** tests for the tenant x role x feature
786
795
  matrix (**not** e2e), e2e for a few real journeys only, with the rule of thumb "no URL or page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.769",
3
+ "version": "1.0.770",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",