@astram/guide 0.2.14 → 0.2.15

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 (2) hide show
  1. package/CAPABILITIES.md +13 -1
  2. package/package.json +1 -1
package/CAPABILITIES.md CHANGED
@@ -587,7 +587,19 @@ upload(@Req() req: Record<string, unknown>) {
587
587
  - **Set `POOL_MAX_ENGINE`** (e.g. 10). Unset, the engine pool uses `APP_DB_MAX_CONNECTIONS`, and
588
588
  the single-layout budget `workers × (POOL_MAX_CORE + POOL_MAX_ENGINE + APP_AUTHZ_POOL_MAX) +
589
589
  headroom` fails boot. `APP_DB_MAX_USER_CONNECTIONS` (the account's cap, if the host sets one) is
590
- checked too.
590
+ checked too. The budget also counts 1 connection per worker for the audit sealer's own pool.
591
+ - **Set `POOL_WORKERS` and `APP_DB_MAX_CONNECTIONS` too** (your real worker count and what the
592
+ server gives you). Their defaults (8 workers, 250) describe a dedicated four-database server; on
593
+ them the single-layout budget is 8 × 27 + 40 = 256 > 250 and boot fails.
594
+ - **Idle connections and timeouts (G-026, both layouts):** the `POOL_MAX_*` values are caps. Idle,
595
+ every framework pool shrinks to `POOL_MIN_IDLE` (default 1) after `POOL_IDLE_TIMEOUT_S` (default
596
+ 600), so an idle process holds about 4 connections. Optional `APP_DB_QUERY_TIMEOUT_MS`
597
+ (1000–3600000) aborts a longer statement (the framework's lock waits and the sealer are exempt);
598
+ optional `POOL_LEAK_DETECTION_MS` logs a connection held longer. Invalid values fail boot. Never
599
+ build or patch a pool to tune these; if a setting is missing, flag a gap.
600
+ - **Shutdown:** `main.ts` must call `app.enableShutdownHooks()` (the scaffold does; add it to an app
601
+ scaffolded before G-026). Then a SIGTERM stops the framework's jobs, finishes in-flight requests
602
+ and closes every pool. Set PM2 `kill_timeout` (e.g. 5000 ms) above the shutdown time.
591
603
  - All framework tables keep their names in `<db>`; your tables live there too. **Reserved
592
604
  table names:** your object types and migrations must not use a framework table name (`companies`,
593
605
  `users`, `roles`, `departments`, `branches`, `company_membership`, `membership_posting`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astram/guide",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "license": "MIT",
5
5
  "description": "Astram framework — the AI/dev GUIDE layer (ADR-0025). Ships the framework's hard rules + capabilities manifest as installed, upgrade-refreshed docs. A consumer app's CLAUDE.md references FRAMEWORK_RULES.md from this package; `npm update` replaces it wholesale so new rules arrive cleanly, while the app's own .astram/guide/ layer is never touched. This is the framework-owned FLOOR: an app rule may tighten it, never weaken it.",
6
6
  "type": "commonjs",