@teamscala/service-boot 0.23.503 → 0.23.505

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.
Files changed (62) hide show
  1. package/package.json +1 -1
  2. package/src/agreement-gate/signing-shell.test.ts +9 -15
  3. package/src/agreement-gate.test.ts +8 -15
  4. package/src/asset-proxy.test.ts +9 -9
  5. package/src/attach-portal-members.test.ts +9 -13
  6. package/src/attach-transfers-upload.test.ts +9 -10
  7. package/src/auth-gate.test.ts +8 -7
  8. package/src/build-client-assets/manifest.test.ts +8 -14
  9. package/src/build-client-assets/source-candidates.test.ts +9 -11
  10. package/src/build-client-assets/sourcemaps-upload.test.ts +8 -15
  11. package/src/build-client-assets/styles-build.test.ts +9 -15
  12. package/src/build-client-assets.test.ts +8 -12
  13. package/src/capability-slug.test.ts +9 -0
  14. package/src/compose-page-title.test.ts +8 -9
  15. package/src/content-gate/catalog.test.ts +8 -8
  16. package/src/content-gate/token.test.ts +8 -13
  17. package/src/content-page-floor.test.ts +9 -11
  18. package/src/csrf-body-limit.test.ts +9 -15
  19. package/src/handlers/messaging-send-reconcile-logic.test.ts +9 -11
  20. package/src/handlers/messaging-send-recording-logic.test.ts +9 -9
  21. package/src/handlers/messaging-send-recording-watch.test.ts +9 -11
  22. package/src/handlers/messaging-send-sweep-selection.test.ts +9 -7
  23. package/src/handlers/platform-fault-escalation/probe.test.ts +9 -10
  24. package/src/handlers/platform-fault-escalation-refresh.test.ts +9 -22
  25. package/src/handlers/platform-fault-escalation.test.ts +9 -10
  26. package/src/handlers/scala-tools-currency-watch.test.ts +9 -0
  27. package/src/handlers/singleton-tools-currency-watch.test.ts +9 -0
  28. package/src/handlers/whatsapp-liveness-handler.test.ts +9 -12
  29. package/src/handlers/whatsapp-liveness.test.ts +9 -9
  30. package/src/interpolate-meta.ts +123 -0
  31. package/src/is-react-element-type.test.ts +8 -9
  32. package/src/loader-errors.ts +41 -0
  33. package/src/module-not-found.test.ts +8 -12
  34. package/src/mount-orpc-router.test.ts +8 -9
  35. package/src/page-server-orpc/server-client.test.ts +8 -17
  36. package/src/read-html-template.test.ts +8 -12
  37. package/src/register-registry-page-route/apply-page-branding.test.ts +8 -19
  38. package/src/register-registry-page-route/captured-loader-config.test.ts +9 -13
  39. package/src/register-registry-page-route/graph-cache.test.ts +9 -12
  40. package/src/register-registry-page-route/live-loader-config.test.ts +8 -24
  41. package/src/register-registry-page-route/meta-title.ts +1 -1
  42. package/src/register-registry-page-route/page-data-shared.test.ts +9 -12
  43. package/src/register-registry-page-route/public-shell-page-data.test.ts +8 -19
  44. package/src/register-registry-page-route/resolve-entity-title.test.ts +8 -7
  45. package/src/register-registry-page-route/resolve-page-data.test.ts +9 -13
  46. package/src/register-registry-page-route/resolve-request-graph.test.ts +9 -13
  47. package/src/resolve-from-loader-config.test.ts +10 -14
  48. package/src/resolve-from-loader-config.ts +28 -115
  49. package/src/resolve-service-port.test.ts +8 -12
  50. package/src/resolvers/app-header.test.ts +9 -5
  51. package/src/resolvers/fetch-org-brand.ts +18 -2
  52. package/src/resolvers/portal-route-paths.test.ts +8 -13
  53. package/src/resource-chat-inject.page-assistant.test.ts +8 -28
  54. package/src/resource-chat-inject.test.ts +8 -25
  55. package/src/resource-not-found.test.ts +9 -8
  56. package/src/security-headers.test.ts +9 -12
  57. package/src/select-service-routes.test.ts +9 -0
  58. package/src/server-error-page.test.ts +8 -10
  59. package/src/theme-fonts-link.test.ts +8 -10
  60. package/src/two-phase-full-app.test.ts +8 -16
  61. package/src/two-phase-health-gate-client-only.test.ts +8 -28
  62. package/src/two-phase-health-gate.test.ts +8 -28
package/package.json CHANGED
@@ -1130,5 +1130,5 @@
1130
1130
  "repository": "https://github.com/teamgbg/service-boot",
1131
1131
  "sideEffects": false,
1132
1132
  "type": "module",
1133
- "version": "0.23.503"
1133
+ "version": "0.23.505"
1134
1134
  }
@@ -1,18 +1,12 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Behavioural pins for the agreement signing-shell units. The load-bearing
7
- * cases: the gate block carries the OTP switch as the STRING the renderer
8
- * validates against (a boolean is stripped before the block reaches the
9
- * component — the same coercion that bit the pre-placed gate), an empty
10
- * registry title falls back to the DB-driven default, the signing shell
11
- * ALWAYS renders (registry failure falls back to the hardcoded shell), the
12
- * shell is deep-cloned per call (injection mutates the tree in place), and
13
- * the pre-placed-gate probe recognises an agreement gate by its context
14
- * field — a PROPOSAL gate in the same region must not read as an agreement.
15
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
16
10
  import { describe, expect, mock, test } from "bun:test";
17
11
 
18
12
  let registryBlocks: unknown = undefined;
@@ -1,18 +1,11 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Regression test for the new-flow agreement gate's body-region targeting.
7
- * The body region of the public sign shell IS resolved.page (composed by
8
- * register-registry-page-route.ts Branch 2 as extractPuckData(resolved.page)).
9
- * A prior version of getBodyContentArray scored every region by top-level
10
- * non-shell block count and picked the highest — which misruted to /header when
11
- * the body wrapped its clauses inside a Container (body top-level count ~1-2
12
- * vs nested clause count ~40). onUnauthorized then cleared the HEADER and
13
- * injected the gate there, leaving the entire agreement body visible past the
14
- * gate. This test pins the fix: the body is withheld, the header is untouched.
15
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
16
9
 
17
10
  import { describe, expect, test } from "bun:test";
18
11
  import { agreementGateConfig } from "./agreement-gate.ts";
@@ -1,12 +1,12 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Co-located tests for handleAssetProxy's early-return paths: a non-asset path
7
- * 404s, and an asset path with no resolvable S3 client 502s (getClient returns
8
- * null when creds/config are absent — the documented "no client" contract).
9
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
10
10
  import { describe, expect, it } from "bun:test";
11
11
  import { handleAssetProxy } from "./asset-proxy.ts";
12
12
 
@@ -1,16 +1,12 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Behavioural pins for the portal member directory endpoint. The load-bearing
7
- * cases: org-scoped reads bind the orgId as a PARAMETER (never interpolated —
8
- * the orgId arrives from the query string), the all-orgs "View As" mode is
9
- * gated to admin/super_admin sessions (any other caller without an orgId is
10
- * a 400, and an unauthenticated caller never reaches the probe query at
11
- * all), and a database fault is reported as resolve-failed rather than a
12
- * 500 leaking driver detail.
13
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
14
10
  import { describe, expect, mock, test } from "bun:test";
15
11
  import { Hono } from "hono";
16
12
 
@@ -1,13 +1,12 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Co-located test for attachTransfersUpload: it registers the POST
7
- * /api/transfers/upload route on the host app. Hono is a type-only import
8
- * (the real app is built by the runtime), so the host interface is mocked
9
- * here to exercise registration without the Hono dependency.
10
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
11
10
  import { describe, expect, it } from "bun:test";
12
11
  import { attachTransfersUpload } from "./attach-transfers-upload.ts";
13
12
 
@@ -1,10 +1,11 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * The signed-out screen must be able to render its own branding.
7
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
8
9
 
9
10
  import { describe, expect, test } from "bun:test";
10
11
  import { isStaticAssetPath } from "./auth-gate.ts";
@@ -1,17 +1,11 @@
1
- /**
2
- * @system server-handlers
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * verifyClientBuildAssets is the capability probe the readiness flip gates on
7
- * (`a-component-may-not-report-a-state-it-has-not-verified`): a manifest is
8
- * servable only when BOTH assets it names exist on disk. Measured 2026-09-01
9
- * (the unstyled-proposal incident): a manifest that never ran — or a first-boot
10
- * tombstone carrying the unhashed FALLBACK_MANIFEST paths — read as a
11
- * legitimate bundle and the service served pages whose stylesheet 404'd while
12
- * every health surface reported ok. These tests pin the refusal for all three
13
- * unbuilt shapes and the pass for a real build.
14
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
15
9
 
16
10
  import { mkdir, mkdtemp, rm } from "node:fs/promises";
17
11
  import { afterEach, beforeEach, describe, expect, test } from "bun:test";
@@ -1,14 +1,12 @@
1
- /**
2
- * @system server-handlers
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Fixtures for the @source candidate scan. The load-bearing case is the
7
- * DIRECTORY probe: sources are directories, and a Bun.file(dir).exists()
8
- * probe answers false for them — which silently skipped every source,
9
- * zeroed the candidate set, and stripped all Tailwind utilities from every
10
- * kind:ui service's stylesheet (2026-09-01, operator-visible).
11
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
12
10
  import { describe, expect, test } from "bun:test";
13
11
  import { mkdir, rm } from "node:fs/promises";
14
12
  import { join } from "node:path";
@@ -1,18 +1,11 @@
1
- /**
2
- * @system server-handlers
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Behaviour tests for the source-map upload unit. Two measured defects are
7
- * regression-locked here: (1) the pre-2026-09 flow deleted the maps after an
8
- * upload whose responses were never checked, and (2) the direct release-files
9
- * POST it used returns HTTP 405 on GlitchTip, so NOTHING had ever uploaded.
10
- * The CLI integration is verified live on the dev host (57/57 of the
11
- * scala-roadmap release 3b940e0030 uploaded clean); in-test subprocess
12
- * verification is deferred (spawnSync blocks the bun event loop, which would
13
- * deadlock a same-process mock server). These tests cover the pure
14
- * boundaries the verification layer depends on.
15
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
16
9
 
17
10
  import { mkdtemp, mkdir, readdir, rm } from "node:fs/promises";
18
11
  import { tmpdir } from "node:os";
@@ -1,18 +1,12 @@
1
- /**
2
- * @system server-handlers
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Behavioural pins for the stylesheet resolver (operator ruling 2026-09-03:
7
- * the fallback chain IS the drift — a bare id resolved via Bun.resolve
8
- * returned whatever the package's main was (a .js for a normal package),
9
- * the resolve(base, id) tail invented nonexistent paths whose ENOENT
10
- * surfaced as misleading downstream CSS errors, and inlineCssImports
11
- * SWALLOWED unresolved imports, leaving literals that failed downstream
12
- * instead of at the build. Every case below pins the ruled contract:
13
- * resolve or THROW naming the specifier; remote https imports are skipped
14
- * explicitly, never resolved and never thrown on.
15
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
16
10
  import { describe, expect, test } from "bun:test";
17
11
  import { mkdir, rm } from "node:fs/promises";
18
12
  import { join } from "node:path";
@@ -1,15 +1,11 @@
1
- /**
2
- * @system server-handlers
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Regression guard for stripRemoteImports. Third-party package CSS must not
7
- * inject a remote @import (the dropped/CSP-blocked Inter-font class, scala-docs
8
- * 2026-06-13): @puckeditor/core/dist/index.css leads with `@import
9
- * "https://rsms.me/inter/inter.css"`, a CDN our CSP forbids. The compiled
10
- * bundle must carry zero remote @imports; the app loads its font from the
11
- * CSP-allowlisted Google Fonts <link> in index.html instead.
12
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
13
9
 
14
10
  import { mkdtemp, mkdir, rm } from "node:fs/promises";
15
11
  import { tmpdir } from "node:os";
@@ -1,3 +1,12 @@
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
1
10
  import { describe, expect, test } from "bun:test";
2
11
  import { toCapabilitySlug } from "./capability-slug.ts";
3
12
 
@@ -1,12 +1,11 @@
1
- /**
2
- * @system ui-service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Pins composePageTitle: the single canonical title composer. The title is
7
- * derived from website + page/entity name with meta_title as an explicit
8
- * per-page OVERRIDE only, and it NEVER degrades to a bare org name.
9
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
10
9
 
11
10
  import { describe, expect, test } from "bun:test";
12
11
  import { composePageTitle } from "./compose-page-title.ts";
@@ -1,11 +1,11 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * The catalog's invariants — the ones that were unenforceable while the gate
7
- * list lived as two hand-written arrays in two files.
8
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
9
 
10
10
  import { describe, expect, test } from "bun:test";
11
11
  import {
@@ -1,17 +1,12 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Round-trip + binding tests for the content-gate access token. Covers the
7
- * identity-carrying additions (signAccessToken `name` + verifyAccessTokenIdentity)
8
- * used by the public GPT lead-capture gate, plus the gate/resource/expiry
9
- * binding that every gate relies on to withhold content from a link holder.
10
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
11
9
 
12
- // A stable secret so secret() resolves deterministically in the test. Set BEFORE
13
- // importing the module under test (secret() reads it at call time, so order is
14
- // not strictly required, but this keeps the intent explicit).
15
10
  process.env.AUTH_SECRET = "test-secret-at-least-16-chars-long";
16
11
 
17
12
  import { describe, expect, test } from "bun:test";
@@ -1,14 +1,12 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Unit proof of the /roadmap fix's core decision (independent of the publish /
7
- * deploy — verify-before-done). Exercises the pure floor decision + the floor
8
- * render for every case: dead link (no row → 404), empty page (zero blocks →
9
- * 200), normal page (renders), resource_type route (handled elsewhere), and
10
- * region-slot shell (no page source — untouched).
11
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
12
10
  import { test, expect } from "bun:test";
13
11
  import {
14
12
  decideContentPageFloor,
@@ -1,18 +1,12 @@
1
- /**
2
- * @system service-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Behavior proofs for the two boot-chain security invariants:
7
- * - security-csrf-protection: a state-changing form-element POST from an
8
- * untrusted Origin is refused 403; the managed-base-domain Origin (the
9
- * derived trusted set) is allowed; same-origin sec-fetch-site is allowed.
10
- * - security-body-limit: a body over the global limit is refused 413 BEFORE
11
- * any handler runs, and the transfers upload rejects an over-sized
12
- * Content-Length without buffering the body.
13
- * Proxy-is-not-behaviour guards: these exercise the real middleware through
14
- * real Hono requests.
15
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
16
10
  import { describe, expect, it } from "bun:test";
17
11
  import { Hono } from "hono";
18
12
  import { bodyLimit } from "hono/body-limit";
@@ -1,14 +1,12 @@
1
- /**
2
- * @system server-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Fixture pair for the outbound-dispatch reconciliation logic: the clean
7
- * fixture (every GOWA outbound id already recorded) and the violating fixture
8
- * (a raw-dispatched send GOWA knows about that left no messaging_logs row —
9
- * the 2026-08-26 measured class — which MUST come back as a backfill
10
- * candidate).
11
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
12
10
  import { describe, expect, test } from "bun:test";
13
11
  import {
14
12
  buildBackfillRow,
@@ -1,12 +1,12 @@
1
- /**
2
- * @system server-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Unit tests for the pure detection logic of the messaging send-recording
7
- * watch: healthy shape (zero rows) yields null; the failure shape yields the
8
- * aggregate with ordered bounds; the sample keeps the MOST RECENT rows.
9
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
10
10
  import { describe, expect, test } from "bun:test";
11
11
  import {
12
12
  buildUnrecordedPayload,
@@ -1,14 +1,12 @@
1
- /**
2
- * @system server-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Handler-level integration test for `messagingSendRecordingWatch`: mocks the
7
- * Prisma registry + recordEvent, drives the two observed live shapes (the
8
- * three pre-fix rows measured 2026-08-20, and the healthy all-recorded state),
9
- * and asserts the `messaging.send.unrecorded` durable event fires for exactly
10
- * the failure shape — without touching the real database.
11
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
12
10
  import { beforeEach, expect, mock, test } from "bun:test";
13
11
 
14
12
  const recordEventCalls: Array<{ kind: string; payload: Record<string, unknown> }> = [];
@@ -1,10 +1,12 @@
1
- /**
2
- * @system server-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Tests for the reconcile sweep's chat-page selection.
7
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
8
10
  import { describe, expect, test } from "bun:test";
9
11
  import {
10
12
  selectChatsToSweep,
@@ -1,13 +1,12 @@
1
- /**
2
- * @system server-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Behavioural tests for the capability probe behind the resolve gate
7
- * (operator ruling 2026-08-28): an episode whose subject is genuinely down
8
- * must FAIL to close. Health surfaces encode capability in the STATUS CODE
9
- * (llm-router /health answers 503 while degraded), so healthy means 2xx.
10
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
11
10
  import { afterAll, beforeAll, describe, expect, test } from "bun:test";
12
11
  import { probeHttpOk } from "./probe.ts";
13
12
 
@@ -1,25 +1,12 @@
1
- /**
2
- * @system server-boot
3
- * @status handwritten
4
- * @edit edit directly
5
- *
6
- * Unit tests for episode FACT CURRENCY — a separate concern from the
7
- * threshold/dedup semantics locked by `platform-fault-escalation.test.ts`,
8
- * and kept in its own file because that one already sits over the size
9
- * budget.
10
- *
11
- * WHAT THIS LOCKS. The sweep escalated once and then never wrote the row
12
- * again, so an open episode's window facts froze at their escalation-time
13
- * values while the fault kept firing. Measured 2026-08-28: the
14
- * `host-command-bus.command.failed` row read `last_seen_at` fifteen hours old
15
- * with 1,150 further events recorded after it, and a reader — this lane
16
- * included — concluded from the row that the fault had stopped.
17
- *
18
- * The stale value is not only cosmetic: `decideSweep` falls back to
19
- * `episode.lastSeenAt` once a kind drops out of the window, so a frozen
20
- * timestamp makes a just-gone-quiet fault look quiet for hours and closes the
21
- * episode immediately instead of after its configured resolve window.
22
- */
1
+ // ! @system codegen
2
+ // ! @status generated
3
+ // ! @edit change the suite in the owned-suites band, then re-run codegen. Hand-edits are overwritten.
4
+ // !
5
+ // ! This suite's assertions are OWNED by the codegen band: the band module
6
+ // ! carries them verbatim, this file is the emission, and hand edits here are
7
+ // ! overwritten on the next run. The rationale each assertion carries moved
8
+ // ! with it into the band.
9
+
23
10
  import { describe, expect, test } from "bun:test";
24
11
  import { episodeNeedsRefresh, pagesOperator } from "./platform-fault-escalation-logic.ts";
25
12