@openlup/outbox 0.13.1 → 0.15.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/AGENTS.md +27 -1
- package/CHANGELOG.md +14 -0
- package/README.md +61 -1
- package/package.json +5 -3
package/AGENTS.md
CHANGED
|
@@ -36,4 +36,30 @@ Composition can report `OPENLUP_E_PORT_MISSING`, `OPENLUP_E_EVENT_UNHANDLED`, `O
|
|
|
36
36
|
|
|
37
37
|
## Using this package in an application
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Keep the dispatch engine in its authentic npm package. Do not edit
|
|
40
|
+
`node_modules/@openlup/**`, autonomously patch/fork/vendor/monkey-patch/shadow the
|
|
41
|
+
package or restore a copied engine. Use declared public exports. Drivers,
|
|
42
|
+
handlers, policies, host bindings and compatible native stores remain ordinary
|
|
43
|
+
application code; they need no record per function or upstream release.
|
|
44
|
+
|
|
45
|
+
The public `withPayloadSchema`, `composeHandlers` and `uniqueRegistry` seams keep
|
|
46
|
+
handler policy and effects in the application. The [README](README.md) explains
|
|
47
|
+
retry, transaction, fence and admission obligations; `./testing` supplies the
|
|
48
|
+
store-fence check, not complete adapter or absorption proof. A missing seam needs
|
|
49
|
+
a local reproducer and authorized upstream proposal. Use a supported compatible
|
|
50
|
+
wrapper/adapter, or hold the dependent change while retaining compatible serving
|
|
51
|
+
work or an available compatible rollback. Do not rewrite published SQL or lose
|
|
52
|
+
pending obligations.
|
|
53
|
+
|
|
54
|
+
Upgrade every `@openlup/*` together after reading all `Migration:` blocks. Compare
|
|
55
|
+
current producer/schema/policy/bindings with the actual target at first adoption
|
|
56
|
+
and upgrade. Settle affected nominations as full, partial, retained or hold using
|
|
57
|
+
capability and durable-effect evidence, including dormant branches and retry;
|
|
58
|
+
keep distinct same-event effects. Move or settle open markers when native code is
|
|
59
|
+
refactored even without pin changes. A merged contribution is not adoption proof.
|
|
60
|
+
|
|
61
|
+
This guide describes the installed contract; it grants no host/tool/external-write
|
|
62
|
+
authority and installs no controls. The monorepo's contributor process does not
|
|
63
|
+
govern your application. Your application owns admission, delivery and production
|
|
64
|
+
authority. The [README's adoption route](README.md#adoption-and-native-extensions)
|
|
65
|
+
links optional source guidance; later instructions do not change this version.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.15.0]
|
|
6
|
+
|
|
7
|
+
- Publishable on the npm `latest` dist-tag as `0.15.0`, from tag
|
|
8
|
+
`openlup-outbox-v0.15.0`.
|
|
9
|
+
|
|
10
|
+
- Republish with the exact `@openlup/core` `0.15.0` peer pin in the set that adds `@openlup/platform`; Outbox APIs, runtime behavior and shipped SQL are unchanged.
|
|
11
|
+
|
|
12
|
+
## [0.14.0]
|
|
13
|
+
|
|
14
|
+
- Publishable on the npm `latest` dist-tag as `0.14.0`, from tag
|
|
15
|
+
`openlup-outbox-v0.14.0`.
|
|
16
|
+
|
|
17
|
+
- Republish with the exact `@openlup/core` `0.14.0` peer pin; Outbox APIs, runtime behavior and shipped SQL are unchanged.
|
|
18
|
+
|
|
5
19
|
## [0.13.1]
|
|
6
20
|
|
|
7
21
|
- Publishable on the npm `latest` dist-tag as `0.13.1`, from tag
|
package/README.md
CHANGED
|
@@ -28,8 +28,68 @@ Prune defaults to 30 days for processed and 90 for discarded, in batches of 500.
|
|
|
28
28
|
|
|
29
29
|
## Readiness and verification
|
|
30
30
|
|
|
31
|
-
<!-- openlup-doc-impact {"unit":"outbox-rail","digest":"sha256-
|
|
31
|
+
<!-- openlup-doc-impact {"unit":"outbox-rail","digest":"sha256-9445d29261300fbb26fc654d53e7c99ac9bde297ba426d2d000906ab9bc8e598","reason":"The manifest moves from 0.14.0 to 0.15.0 with the exact @openlup/core 0.15.0 peer pin, for the set that first publishes @openlup/platform, and the reference outbox inventory test reads the expected set version from the live core manifest instead of a pinned value. The rail, its ports, readiness and verification described here are unchanged."} -->
|
|
32
32
|
|
|
33
33
|
Compose the contribution with `@openlup/core/readiness`, actual loaded package metadata, selected-adapter schema observations and host bindings to the exact contribution run/handle functions before activating the exact new candidate. Only `ready` admits; `unknown` and `unsatisfied` leave the serving version running. Descriptors are inert; the builder supplies the same actual event identities and effective timeouts after lease acquisition. The default schema declaration describes catalog existence and overloads; it does not prove bodies, ACL or recovery. Use framework-free fence conformance from `./testing` and real transactional proof for your adapter. No ambient database URL is used by the packed proof.
|
|
34
34
|
|
|
35
|
+
From an OpenLup task checkout, the existing packed proof accepts an explicit disposable loopback PostgreSQL database and a verified cold-set manifest:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
node --experimental-strip-types scripts/packages/outbox-consumer-proof.ts \
|
|
39
|
+
postgresql://postgres@127.0.0.1:5432/openlup_outbox_proof \
|
|
40
|
+
.context/scratch/outbox-packed-proof \
|
|
41
|
+
--manifest "$OPENLUP_PACK_MANIFEST" --expected-commit "$OPENLUP_PACK_COMMIT"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Supply both manifest inputs together. The runner verifies the exact publishable inventory, versions, commit and tarball digests before installation; missing or damaged input refuses without repacking. It installs only Core and Outbox, the packages imported by this reference composition; unrelated modules have their own consumers. It installs outside checkout ancestry with scripts disabled, records consumed artifacts and installed identities in task scratch, injects only the host PostgreSQL test driver and compiles the actual reference composition. Omitting both inputs retains manual packing of already-built packages. The caller owns the disposable database; the proof closes its pools and removes its temporary consumer on success or failure. Required CI and its local runner provide an owned PostgreSQL 17 instance and an enclosing deadline.
|
|
45
|
+
|
|
46
|
+
For the local required route, run `node --experimental-strip-types scripts/packages/outbox-disposable-postgres.ts --manifest <manifest-path> --expected-commit <full-sha>`. It owns a fresh pinned PostgreSQL 17 container, loopback port, database and cleanup; it refuses invalid artifacts before starting the service. The CI form receives the exact pinned job service container ID and mapped port, creates only this proof's UUID-named database and drops it afterward, including when the CREATE response is lost. The manual proof above retains its fixed disposable database name; the owned route uses `openlup_outbox_proof_<32 lowercase UUID hex digits>`. Neither form adopts an ambient service. Local cleanup can recover the container by its known unique name if its creation response is lost, and requires the actual name, ID and owner label before removal. Startup is bounded at 30 seconds, packed child work at 180 seconds, and each Docker operation at 30 seconds; interruptions terminate the child process group before owned cleanup. Repeated signals forwarded by npm or the package wrapper remain handled until cleanup finishes. The actual proof owner also shields its bounded cleanup inspect, container removal and database DROP commands from verifier group signals. The owner stays in that group until those commands finish; their existing 30-second limits and all ownership checks remain. Local containers use one CPU and 512 MiB of memory. These are proof bounds, not package runtime settings.
|
|
47
|
+
|
|
48
|
+
Before SQL, the Outbox binding supplies its actual installed schema/probe/checker exports and reference input to the common repository test utility `scripts/packages/schema-budget-proof.mjs`. Future modules can reuse that utility with their own installed requirement and input callback; it carries no package registry or duplicate schema inventory. Its positive serial model uses 250 ms setup plus 100 ms per presence operation, so actual schema growth participates automatically. A single operation longer than the unchanged 3000 ms waiting deadline proves timeout refusal even if the adapter later batches reads. Completeness and overload cases follow the supplied schema's capabilities. Timer cleanup does not imply cancellation of pending driver work; the proof settles its owned fake queue before restoring real timers. The same real database then demonstrates absent table, column and function-overload observations. A single replay witness accepts a synthetic durable effect, loses acknowledgement, reclaims the same event through scheduled work after immediate work, refuses the formerly valid token and acknowledges the new claim. Multiple attempts with one application-owned deduped effect demonstrate at-least-once recovery for this synthetic example, not provider recovery or a universal exactly-once contract.
|
|
49
|
+
|
|
50
|
+
The same installed Core tarball also executes the additive grouped readiness
|
|
51
|
+
catalog query in [the neutral grouped proof](smoke/groupedSchemaProof.ts).
|
|
52
|
+
Within a host-owned read-only repeatable-read transaction it compares grouped
|
|
53
|
+
presence with every scalar probe, including the existing Outbox requirement,
|
|
54
|
+
exact overloads, absent objects, dropped/system columns, views and sequences,
|
|
55
|
+
quoted relation names, duplicate ordinals and an empty request. Independent
|
|
56
|
+
catalog reads verify constraints, indexes, noninternal triggers, policies and
|
|
57
|
+
function definitions. Fresh tables/partitions, identity/generated/default
|
|
58
|
+
columns, RLS, ACL and function configuration/security/volatility exercise rich
|
|
59
|
+
and empty shapes. The proof requires jsonb text rows, definition-string arrays,
|
|
60
|
+
null empty aggregates, raw policy OIDs/command codes/booleans and exact parsed
|
|
61
|
+
jsonb property/nested ordering. Parsed driver objects are refused.
|
|
62
|
+
Invalid catalog resolution still propagates to the host. This reuses the existing
|
|
63
|
+
pinned PostgreSQL service, artifact checks and cleanup; it adds no gate or host
|
|
64
|
+
admission policy and does not prove effective authorization or SQL behavior.
|
|
65
|
+
|
|
66
|
+
The root companion tests retain real interruption and lost-response fixtures. Their owned JSON witness markers are written completely to a same-directory temporary file and then renamed into place, so readers never treat a newly created, partially written file as a ready observation. A plain Node process owns each fixture's service and launcher and stays in the root test process group until teardown finishes, even when Vitest's worker exits. Only the bounded Docker cleanup commands detach; their process-start window can still receive a group TERM. The companion fixture allows one recovery only for a child terminated by SIGTERM with no reported error, inside the original 10-second inspect or removal deadline. An interrupted removal is followed by actual Docker inspection: normal no-such-object refusal confirms absence, otherwise the same full ID, name and UUID label must still match before one removal retry. The recovery never resets its deadline, treats a signal as absence, or masks a timeout, nonzero result, wrong owner or second interruption. Cleanup recovers by the known unique name after a lost creation response. Root cancellation regressions interrupt actual Vitest workers after service creation and after detached proof readiness, and check resource termination before releasing their own test lock. They create no verification stamp or shared verifier lock. Separate teardown regressions cancel the actual npm/launcher route during each cleanup operation and assert that its container or UUID database is removed while an unrelated supplied-service database remains.
|
|
67
|
+
|
|
35
68
|
Upgrade the complete `@openlup/*` set together after reading each changelog. Use ports and composition; do not edit or patch installed package bytes. Sources are in `src/`, built JavaScript/declarations in `dist/`. Synthetic packed-consumer proof is first-party package evidence, not an independent adopter, provider-delivery or deployment certificate.
|
|
69
|
+
|
|
70
|
+
## Adoption and native extensions
|
|
71
|
+
|
|
72
|
+
One npm package owns the dispatch algorithm. Application drivers, handlers,
|
|
73
|
+
policies, host bindings and compatible native stores remain editable through
|
|
74
|
+
public seams without a nomination or per-function ownership record. Do not
|
|
75
|
+
autonomously fork, vendor, monkey-patch, shadow or restore a copied engine; use
|
|
76
|
+
only the installed package's declared exports. A missing seam follows the
|
|
77
|
+
[agent guide's dependent hold and compatible recovery route](AGENTS.md#using-this-package-in-an-application).
|
|
78
|
+
|
|
79
|
+
At first adoption compare the actual selected artifact with current consumer
|
|
80
|
+
behavior, including producer payload/schema and composition changes outside the
|
|
81
|
+
extracted engine. On upgrades, preserve pending obligations, transactional enqueue,
|
|
82
|
+
claim/ack/fencing and native recovery. Compatible native schema additions remain
|
|
83
|
+
permitted; published SQL stays immutable. Validate the actual adapter and serving
|
|
84
|
+
binding. For full or partial absorption remove only proven duplicate behavior,
|
|
85
|
+
retain distinct effects sharing an event, and demonstrate durable success and
|
|
86
|
+
unfinished work across retries and replacement. Catalogue existence, a handler
|
|
87
|
+
return or an upstream merge alone cannot establish that proof.
|
|
88
|
+
|
|
89
|
+
The public [adopter recipe](https://github.com/openlup/openlup/blob/main/docs/platform/adopter-kit/README.md#adopt-or-upgrade-a-package)
|
|
90
|
+
explains source-local nominations and full/partial/retained/hold dispositions.
|
|
91
|
+
Select that optional source guidance at a deliberate revision against your
|
|
92
|
+
installed contract. This package guide conveys version-bound contract information,
|
|
93
|
+
not tool permissions, an automatic control installation or external-write authority.
|
|
94
|
+
The existing wiring and packed protocol examples remain narrow package evidence;
|
|
95
|
+
a complete extension/absorption/retry witness belongs to the actual module adoption.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openlup/outbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Transactional PostgreSQL outbox rail; development preview.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,10 +32,12 @@
|
|
|
32
32
|
"prepublishOnly": "node -e \"throw new Error('OUTBOX_DIRECTORY_PUBLISH_REFUSED')\"",
|
|
33
33
|
"api:check": "node --experimental-strip-types ./scripts/api-contract.ts",
|
|
34
34
|
"api:update": "npm run build && node --experimental-strip-types ./scripts/api-contract.ts --update",
|
|
35
|
-
"ci": "npm run build && npm run test && npm run api:check"
|
|
35
|
+
"ci": "npm run build && npm run test && npm run api:check",
|
|
36
|
+
"ci:required": "npm run test:consumer",
|
|
37
|
+
"test:consumer": "node --experimental-strip-types ./scripts/consumer-proof.ts"
|
|
36
38
|
},
|
|
37
39
|
"peerDependencies": {
|
|
38
|
-
"@openlup/core": "0.
|
|
40
|
+
"@openlup/core": "0.15.0"
|
|
39
41
|
},
|
|
40
42
|
"exports": {
|
|
41
43
|
".": {
|