Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Carry the narrow disposable-library dependency in emitted Runtime declarations
so strict ES2022 consumers can import the installed package and use close or
async disposal without a broad ESNext library override
([#981](https://github.com/git-stunts/git-warp/issues/981)).

- Capture a coherent observed writer basis before public live writes, advancing
Lamports beyond inspected patches and retaining frontier evidence with the
admitted operations across restart ([#957](https://github.com/git-stunts/git-warp/issues/957)).
Expand Down
2 changes: 2 additions & 0 deletions docs/operations/package-payload.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ extraction, inspection, and supply-chain surface.
This contract defines which path classes may cross the npm publication
boundary and how the release gate proves that the actual tarball obeys it.

Public declarations carry their required standard-library dependencies. Runtime's emitted declaration preserves a narrow `esnext.disposable` reference so strict ES2022 consumers can import it without a broad ESNext override or `skipLibCheck`. The check of the packed consumer in `scripts/check-packed-disposable.sh` covers all five public entrypoints, explicit disposal typing, and installed close/dispose lifecycle behavior in Docker.

## Baseline

At `e69c2f970`, after a clean publish build, this command:
Expand Down
29 changes: 29 additions & 0 deletions scripts/check-packed-disposable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
node scripts/RequireDockerTests.ts
repo=$PWD
work=$(mktemp -d "${TMPDIR:-/tmp}/packed-disposable.XXXXXX")
trap 'rm -rf "$work"' EXIT
mkdir -p "$work/pack" "$work/consumer"
node scripts/package-payload/CheckPackagePayload.ts --pack-destination "$work/pack"
cp test/type-check/packed-disposable/* "$work/consumer/"
cd "$work/consumer"
npm install --ignore-scripts --no-audit --no-fund --fetch-retries=0 --fetch-timeout=15000 "$work"/pack/*.tgz >/dev/null
node "$repo/node_modules/typescript/bin/tsc" --version
failed=0
for config in root-close root-dispose advanced combined explicit-disposable testing diagnostics charts; do
if node "$repo/node_modules/typescript/bin/tsc" -p "tsconfig.$config.json"; then
echo "PACKED_DISPOSABLE_CASE $config PASS"
else
echo "PACKED_DISPOSABLE_CASE $config FAIL"
failed=1
fi
done
if ! grep -q '^/// <reference lib="esnext.disposable"' node_modules/@git-stunts/git-warp/dist/src/application/Runtime.d.ts; then
echo "PACKED_DISPOSABLE_EMISSION FAIL"
failed=1
fi
if ! node lifecycle.mjs; then
failed=1
fi
exit "$failed"
1 change: 1 addition & 0 deletions src/application/Runtime.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference lib="esnext.disposable" preserve="true" />
import Lane from '../domain/api/Lane.ts';
import type SettlementPreview from '../domain/api/SettlementPreview.ts';
import type SettlementReceipt from '../domain/api/SettlementReceipt.ts';
Expand Down
17 changes: 17 additions & 0 deletions test/evidence/981-disposable-consumer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Strict installed ES2022 disposable declarations: issue 981

Source base 5c82ba6ca168d07b743fac5c6adbf38822ae0302 is the reviewed locked-audit prerequisite. Runtime, public entrypoints and compiler configuration are byte-identical to main/v20.0.0 ceb58e656ec5bc85f0ae5991bf2a55599693bbb3; no disposal fix exists. The initial probe independently installs the actual packed artifact and reproduces TS2550 at emitted Runtime.d.ts:30 with TypeScript 5.9.3, strict NodeNext/ES2022, skipLibCheck=false, explicit ES2022/DOM/DOM.Iterable, types=[] and no source aliases.

The full matrix repeats with committed portable fixtures: root-close, root-dispose and combined root/advanced fail. Root-dispose additionally fails the consumer symbol access. Advanced-only and explicit ESNext.Disposable controls pass. This isolates the missing narrow declaration dependency rather than a general module-resolution failure. Package payload gates pass 746177 compressed / 3257290 unpacked / 971 entries within unchanged 760000 / 3300000 / 1050 limits. No GREEN or source repair is claimed.

All execution is COPY-based Docker under the existing git-warp-tests worker/image/build volume and only its concrete resource reservation. Build 20 GiB is monitored, not quota-backed; runtime 3 GiB tmpfs remains within 4 GiB; logs 128 MiB with 16 MiB phase / 96 MiB generated nonobject; 4 CPU / 8 GiB / pids 768 and host / VM 50 GiB floors/timeouts/child cleanup remain active. Matrix peak 50536448 runtime bytes, 50917376 generated nonobject, 1960185856 build, 27 tasks; no guard/OOM/PID refusal. Worker stops before lease release. Raw and normalized/archive hashes retain exact scopes. Mainline merging remains paused.

## Reviewed narrow repair and GREEN

Agy approves the one preserved narrow esnext.disposable reference at Runtime's public declaration boundary. Complete original/artifacts/qualification are delivered intact to Reader under receipt e645ff44-1a8a-423f-a8e9-5f9ce8a51716 and posted on 981 before implementation. Unsupported estimates, consumer compiler floor and reviewer authorization language remain qualified; the user already authorizes implementation and PR preparation. Private WarpStorage declarations are pruned and need no new public reference.

The only production change is the top-of-file preserved reference in Runtime.ts. It adds a standard declaration dependency and no runtime statements. Disposable-green-981-v3 passes source/test types, explicit source/fixture lint without ignored-file warning, all 8 strict installed compiler cases and 3 native lifecycle cases. Root close / direct dispose / combined/advanced/testing/diagnostics/charts/explicit-narrow-library cases pass with TypeScript 5.9.3, no source aliases, types=[], ES2022 and skipLibCheck=false. Installed close, repeated dispose, concurrent close / dispose and closed-runtime refusal retain behavior. Actual payload 746269 compressed / 3257406 unpacked / 971 entries passes unchanged limits.

Runtime-parity-981-v2 independently strips only the reference prefix in the copied guest source, re-emits the baseline to owned bounded output, and compares generated JavaScript after removing the single new comment. Bytes match exactly. Baseline JS SHA256 b54207d16ecb141d9e79b3785f6561363fc5779f04434439fc86002d3385b3d9; candidate 532e9cd708bc36a84ec4987d7c0ee3831f3078d6a959b19a87dc8eaaa8902716. The differing bytes are the comment, not a hidden runtime change. This identified comparison command is not a claim that its guest source stayed unchanged.

Earlier attempts remain qualified: GREEN v1 passes 8 compiler cases but fails missing container rg; v2 passes compile / lifecycle but explicitly surfaces an ignored-fixture lint warning; parity v1 refuses at fixture console/no-undef before comparison. The fixture imports Node stdout and v3 / parity v2 verify actual lint cleanly. No threshold, skipLibCheck, engine floor, symbol identity, global configuration or runtime behavior is weakened. This type-only annotation is not a runtime refactor; SSJS is green with no new domain model, boundary leakage, ambient time / entropy or trust casts. Full required project gates, final-head independent review and hosted validation remain open. Mainline merging stays paused.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"phase": "disposable-green-981-v1",
"inner_guard_sha256": "2e898488b42ef2d6885c79a124d3deef5cc17086f5b8846e75833145a75dd27d",
"worker": "git-warp-tests",
"image": "sha256:9f145953f6e79a59749a683d11a476133cb7cef0588b79256dc195b1d0c87ad7",
"source_base": "48eea225c0880a1aac8b7bf6a1e6b75ada140191",
"source_archive_sha256": "242985138c37323bb0b8be0d1d7d0bc6e1b4e5f4dff969a934e158ee322c4b1b",
"source_archive_bytes": 21258240,
"baseline_inputs": {},
"command": [
"bash",
"-c",
"npm run typecheck && node node_modules/eslint/bin/eslint.js src/application/Runtime.ts && bash scripts/check-packed-disposable.sh"
],
"lock_store": "workstation.git",
"lock_keys": [
"host/docker/git-warp-tests/"
],
"outputs": [
"build volume /app",
"runtime /data",
"bounded /tmp and <CONTAINER_HOME> and /dev/shm",
"Docker rotated log",
"host receipts"
],
"host_free_bytes": 722965827584,
"host_receipt_bytes": 7500519,
"build_limit_bytes": 21474836480,
"data_quota_bytes": 3221225472,
"generated_nonobject_limit_bytes": 100663296,
"stdout_limit_bytes": 16777216,
"memory_bytes": 8589934592,
"cpus": 4,
"cpu_affinity": "0-3",
"pids_limit": 768,
"timeout_seconds": 1700,
"stop_boundary": "git-warp-tests",
"guard": "inner guard plus outer host free/log monitor; read-only container root",
"vm_free_bytes": 687134674944,
"initial_build_bytes": 1956798464
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"exit_code": 1,
"guard_error": null,
"peaks": {
"pids": 23,
"build_bytes": 1960337408,
"/data": 59355136,
"<CONTAINER_HOME>": 0,
"/tmp": 0,
"/dev/shm": 0,
"generated_nonobject_bytes": 59740160,
"minimum_vm_free_bytes": 687134674944
},
"stdout_bytes": 685,
"timeout_seconds": 1700,
"measurement_pauses": 16,
"measurement_pause_seconds": 1.2766263351077214,
"cgroup": {
"pids.current": "3",
"pids.max": "768",
"pids.events": "max 0",
"memory.events": "low 0\nhigh 0\nmax 0\noom 0\noom_kill 0\noom_group_kill 0\nsock_throttled 0",
"cpu.max": "400000 100000",
"cpuset.cpus.effective": "0-3"
},
"limits": {
"build_bytes": 21474836480,
"runtime_tmpfs_bytes": 3221225472,
"stdout_bytes": 16777216,
"generated_nonobject_bytes": 100663296
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"phase": "disposable-green-981-v2",
"inner_guard_sha256": "2e898488b42ef2d6885c79a124d3deef5cc17086f5b8846e75833145a75dd27d",
"worker": "git-warp-tests",
"image": "sha256:9f145953f6e79a59749a683d11a476133cb7cef0588b79256dc195b1d0c87ad7",
"source_base": "48eea225c0880a1aac8b7bf6a1e6b75ada140191",
"source_archive_sha256": "48b860c27078b580689238819f0f087ae93bc2b4902c70c7eb180cbb367f172a",
"source_archive_bytes": 21268480,
"baseline_inputs": {},
"command": [
"bash",
"-c",
"npm run typecheck && node node_modules/eslint/bin/eslint.js src/application/Runtime.ts test/type-check/packed-disposable/lifecycle.mjs && bash scripts/check-packed-disposable.sh"
],
"lock_store": "workstation.git",
"lock_keys": [
"host/docker/git-warp-tests/"
],
"outputs": [
"build volume /app",
"runtime /data",
"bounded /tmp and <CONTAINER_HOME> and /dev/shm",
"Docker rotated log",
"host receipts"
],
"host_free_bytes": 722958565376,
"host_receipt_bytes": 7503453,
"build_limit_bytes": 21474836480,
"data_quota_bytes": 3221225472,
"generated_nonobject_limit_bytes": 100663296,
"stdout_limit_bytes": 16777216,
"memory_bytes": 8589934592,
"cpus": 4,
"cpu_affinity": "0-3",
"pids_limit": 768,
"timeout_seconds": 1700,
"stop_boundary": "git-warp-tests",
"guard": "inner guard plus outer host free/log monitor; read-only container root",
"vm_free_bytes": 687133822976,
"initial_build_bytes": 1957695488
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"exit_code": 0,
"guard_error": null,
"peaks": {
"pids": 23,
"build_bytes": 1961115648,
"/data": 59359232,
"<CONTAINER_HOME>": 0,
"/tmp": 0,
"/dev/shm": 0,
"generated_nonobject_bytes": 59744256,
"minimum_vm_free_bytes": 687133822976
},
"stdout_bytes": 979,
"timeout_seconds": 1700,
"measurement_pauses": 14,
"measurement_pause_seconds": 1.1071061459952034,
"cgroup": {
"pids.current": "3",
"pids.max": "768",
"pids.events": "max 0",
"memory.events": "low 0\nhigh 0\nmax 0\noom 0\noom_kill 0\noom_group_kill 0\nsock_throttled 0",
"cpu.max": "400000 100000",
"cpuset.cpus.effective": "0-3"
},
"limits": {
"build_bytes": 21474836480,
"runtime_tmpfs_bytes": 3221225472,
"stdout_bytes": 16777216,
"generated_nonobject_bytes": 100663296
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"phase": "disposable-green-981-v3",
"inner_guard_sha256": "2e898488b42ef2d6885c79a124d3deef5cc17086f5b8846e75833145a75dd27d",
"worker": "git-warp-tests",
"image": "sha256:9f145953f6e79a59749a683d11a476133cb7cef0588b79256dc195b1d0c87ad7",
"source_base": "48eea225c0880a1aac8b7bf6a1e6b75ada140191",
"source_archive_sha256": "de53f7401208a7dc19669207bf3dc217767db6d7439a2a047fdaf96851c6cfbb",
"source_archive_bytes": 21268480,
"baseline_inputs": {},
"command": [
"bash",
"-c",
"npm run typecheck && node node_modules/eslint/bin/eslint.js src/application/Runtime.ts && node node_modules/eslint/bin/eslint.js --no-ignore test/type-check/packed-disposable/lifecycle.mjs && bash scripts/check-packed-disposable.sh"
],
"lock_store": "workstation.git",
"lock_keys": [
"host/docker/git-warp-tests/"
],
"outputs": [
"build volume /app",
"runtime /data",
"bounded /tmp and <CONTAINER_HOME> and /dev/shm",
"Docker rotated log",
"host receipts"
],
"host_free_bytes": 723051868160,
"host_receipt_bytes": 7513775,
"build_limit_bytes": 21474836480,
"data_quota_bytes": 3221225472,
"generated_nonobject_limit_bytes": 100663296,
"stdout_limit_bytes": 16777216,
"memory_bytes": 8589934592,
"cpus": 4,
"cpu_affinity": "0-3",
"pids_limit": 768,
"timeout_seconds": 1700,
"stop_boundary": "git-warp-tests",
"guard": "inner guard plus outer host free/log monitor; read-only container root",
"vm_free_bytes": 687203782656,
"initial_build_bytes": 1957703680
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"exit_code": 0,
"guard_error": null,
"peaks": {
"pids": 27,
"build_bytes": 1961103360,
"/data": 59359232,
"<CONTAINER_HOME>": 0,
"/tmp": 0,
"/dev/shm": 0,
"generated_nonobject_bytes": 59744256,
"minimum_vm_free_bytes": 687203782656
},
"stdout_bytes": 710,
"timeout_seconds": 1700,
"measurement_pauses": 16,
"measurement_pause_seconds": 1.2773066610679962,
"cgroup": {
"pids.current": "3",
"pids.max": "768",
"pids.events": "max 0",
"memory.events": "low 0\nhigh 0\nmax 0\noom 0\noom_kill 0\noom_group_kill 0\nsock_throttled 0",
"cpu.max": "400000 100000",
"cpuset.cpus.effective": "0-3"
},
"limits": {
"build_bytes": 21474836480,
"runtime_tmpfs_bytes": 3221225472,
"stdout_bytes": 16777216,
"generated_nonobject_bytes": 100663296
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"phase": "disposable-matrix-red-981-v1",
"inner_guard_sha256": "2e898488b42ef2d6885c79a124d3deef5cc17086f5b8846e75833145a75dd27d",
"worker": "git-warp-tests",
"image": "sha256:9f145953f6e79a59749a683d11a476133cb7cef0588b79256dc195b1d0c87ad7",
"source_base": "5c82ba6ca168d07b743fac5c6adbf38822ae0302",
"source_archive_sha256": "0894f4475342a88f455bc98397a0df29812527ef2c2a79c9c397a07f7161dffe",
"source_archive_bytes": 21227520,
"baseline_inputs": {},
"command": [
"bash",
"scripts/check-packed-disposable.sh"
],
"lock_store": "workstation.git",
"lock_keys": [
"host/docker/git-warp-tests/"
],
"outputs": [
"build volume /app",
"runtime /data",
"bounded /tmp and <CONTAINER_HOME> and /dev/shm",
"Docker rotated log",
"host receipts"
],
"host_free_bytes": 724154601472,
"host_receipt_bytes": 7375569,
"build_limit_bytes": 21474836480,
"data_quota_bytes": 3221225472,
"generated_nonobject_limit_bytes": 100663296,
"stdout_limit_bytes": 16777216,
"memory_bytes": 8589934592,
"cpus": 4,
"cpu_affinity": "0-3",
"pids_limit": 768,
"timeout_seconds": 1700,
"stop_boundary": "git-warp-tests",
"guard": "inner guard plus outer host free/log monitor; read-only container root",
"vm_free_bytes": 688278384640,
"initial_build_bytes": 1956671488
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"exit_code": 1,
"guard_error": null,
"peaks": {
"pids": 27,
"build_bytes": 1960185856,
"/data": 50536448,
"<CONTAINER_HOME>": 0,
"/tmp": 0,
"/dev/shm": 0,
"generated_nonobject_bytes": 50917376,
"minimum_vm_free_bytes": 688278384640
},
"stdout_bytes": 1445,
"timeout_seconds": 1700,
"measurement_pauses": 6,
"measurement_pause_seconds": 0.45706846902612597,
"cgroup": {
"pids.current": "3",
"pids.max": "768",
"pids.events": "max 0",
"memory.events": "low 0\nhigh 0\nmax 0\noom 0\noom_kill 0\noom_group_kill 0\nsock_throttled 0",
"cpu.max": "400000 100000",
"cpuset.cpus.effective": "0-3"
},
"limits": {
"build_bytes": 21474836480,
"runtime_tmpfs_bytes": 3221225472,
"stdout_bytes": 16777216,
"generated_nonobject_bytes": 100663296
}
}
Binary file not shown.
Loading
Loading