Skip to content

Commit bb176de

Browse files
authored
Merge pull request #108 from gmoon/chore/lattice-fill-gaps
chore(lattice): fill representation gaps (tiers 1-4)
2 parents 18c8518 + 458d597 commit bb176de

21 files changed

Lines changed: 243 additions & 64 deletions

.lattice/implementations/core-001.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ version: 1.0.0
77
created_at: 2026-05-11T22:57:00.991022+00:00
88
created_by: agent:claude
99
requested_by: George Moon <george.moon@gmail.com>
10-
meta:
11-
language: typescript
12-
files:
13-
- path: src/index.ts
14-
- path: test/streaming-memory.test.ts
15-
- path: vitest.config.ts
16-
test_command: npm test
10+
meta: {}
1711
edges:
1812
satisfies:
1913
- target: REQ-CORE-001
2014
version: 1.0.0
15+
validates:
16+
- target: THX-SDK-PUBLIC-API
17+
version: 1.0.0
18+
rationale: Zero-any rewrite of send() proves the typed-output approach replaces middleware-stack hacking without functional loss

.lattice/implementations/core-002.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ version: 1.0.0
77
created_at: 2026-05-11T22:57:12.101544+00:00
88
created_by: agent:claude
99
requested_by: George Moon <george.moon@gmail.com>
10-
meta:
11-
language: typescript
12-
files:
13-
- path: src/errors.ts
14-
- path: src/index.ts
15-
- path: test/s3proxy.test.ts
16-
- path: test/helpers/http-mocks.ts
17-
- path: scripts/smoke-examples.sh
18-
test_command: npm test
10+
meta: {}
1911
edges:
2012
satisfies:
2113
- target: REQ-CORE-002
2214
version: 1.0.0
15+
validates:
16+
- target: THX-TYPED-ERRORS
17+
version: 1.0.0
18+
rationale: All four error classes throw correctly with cause attached; examples and CI confirm consumers can render the right HTTP status

.lattice/implementations/core-003.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ version: 1.0.0
77
created_at: 2026-05-11T22:57:12.130405+00:00
88
created_by: agent:claude
99
requested_by: George Moon <george.moon@gmail.com>
10-
meta:
11-
language: typescript
12-
files:
13-
- path: src/index.ts
14-
- path: src/types.ts
15-
- path: test/s3proxy.test.ts
16-
- path: README.md
17-
test_command: npm test
10+
meta: {}
1811
edges:
1912
satisfies:
2013
- target: REQ-CORE-003
2114
version: 1.0.0
15+
validates:
16+
- target: THX-FAIL-FAST-OPT-OUT
17+
version: 1.0.0
18+
rationale: 'Test cases confirm both branches: default true rejects on unreachable bucket, false defers to readiness probe'

.lattice/implementations/core-004.yaml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,15 @@ version: 1.0.0
77
created_at: 2026-05-11T22:57:28.964517+00:00
88
created_by: agent:claude
99
requested_by: George Moon <george.moon@gmail.com>
10-
meta:
11-
language: typescript
12-
files:
13-
- path: src/index.ts
14-
- path: src/request-parser.ts
15-
- path: src/s3-gateway.ts
16-
- path: src/types.ts
17-
- path: examples/express-basic.ts
18-
- path: examples/fastify-basic.ts
19-
- path: examples/fastify-docker.ts
20-
- path: examples/http.ts
21-
- path: test/fetch.test.ts
22-
- path: test/parse-request.test.ts
23-
- path: test/s3proxy.test.ts
24-
test_command: npm test && npm run type-check && bash scripts/smoke-examples.sh
10+
meta: {}
2511
edges:
2612
satisfies:
2713
- target: REQ-CORE-004
2814
version: 1.0.0
15+
validates:
16+
- target: THX-DECOMPOSE
17+
version: 1.0.0
18+
rationale: Parser + gateway + orchestrator split shipped without breaking the public API; src/index.ts dropped from 288 to ~125 LOC
19+
- target: THX-PURE-FETCH
20+
version: 1.0.0
21+
rationale: 'proxy.fetch(req) returning {stream, status, headers} works end-to-end through real S3 (artillery: 300/300 reqs, ~990MB streamed, 0 failures)'

.lattice/implementations/example-001.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ version: 1.0.0
77
created_at: 2026-05-11T22:57:29.055437+00:00
88
created_by: agent:claude
99
requested_by: George Moon <george.moon@gmail.com>
10-
meta:
11-
language: typescript
12-
files:
13-
- path: examples/hono-basic.ts
14-
- path: scripts/smoke-examples.sh
15-
- path: README.md
16-
- path: package.json
17-
test_command: bash scripts/smoke-examples.sh
10+
meta: {}
1811
edges:
1912
satisfies:
2013
- target: REQ-EXAMPLE-001
2114
version: 1.0.0
15+
validates:
16+
- target: THX-PURE-FETCH
17+
version: 1.0.0
18+
rationale: Hono uses the same proxy.fetch() as Express/Fastify, with no library changes — direct evidence of framework-agnostic design
19+
- target: THX-WEB-STANDARDS
20+
version: 1.0.0
21+
rationale: examples/hono-basic.ts ships on Node via @hono/node-server with measured parity (mean=55-58ms across all 3 frameworks); same code runs on Bun/Workers/Deno where the conversion layer disappears

.lattice/implementations/test-001.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,12 @@ version: 1.0.0
77
created_at: 2026-05-11T22:57:29.011183+00:00
88
created_by: agent:claude
99
requested_by: George Moon <george.moon@gmail.com>
10-
meta:
11-
language: typescript
12-
files:
13-
- path: test/s3proxy.test.ts
14-
- path: test/fetch.test.ts
15-
- path: test/concurrent.test.ts
16-
- path: test/streaming-memory.test.ts
17-
- path: test/helpers/http-mocks.ts
18-
- path: test/helpers/aws-mock.ts
19-
- path: scripts/smoke-examples.sh
20-
test_command: npm test && bash scripts/smoke-examples.sh
10+
meta: {}
2111
edges:
2212
satisfies:
2313
- target: REQ-TEST-001
2414
version: 1.0.0
15+
validates:
16+
- target: THX-NO-BUFFERING
17+
version: 1.0.0
18+
rationale: Streaming-memory test pipes 100MB through proxy.fetch() asserting peak RSS delta < 50MB; concurrent test confirms 10 parallel streams produce distinct bytes (no shared buffer)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
id: REQ-BUILD-002
2+
type: requirement
3+
title: Scope pool:forks (with --expose-gc) to streaming test only
4+
body: vitest.config.ts uses pool:'forks' + execArgv:['--expose-gc'] so test/streaming-memory.test.ts can call global.gc(). All other test files pay the fork startup cost too (~100ms/file × ~10 files = ~1s wall time per run). Use vitest 'projects' or per-file pool config to fork only the streaming test.
5+
status: active
6+
version: 1.0.0
7+
created_at: 2026-05-23T22:57:34.379746+00:00
8+
created_by: agent:claude
9+
requested_by: George Moon <george.moon@gmail.com>
10+
priority: P2
11+
category: BUILD
12+
tags:
13+
- perf
14+
- test-config
15+
resolution:
16+
status: deferred
17+
reason: <0.5s saved per test run after vitest 4 oxc speedup; vitest 3.x→4.x workspace/projects config adds more complexity than the saving justifies. Revisit if test suite grows materially.
18+
resolved_at: 2026-05-23T22:57:34.408591+00:00
19+
resolved_by: agent:claude-2026-05-23
20+
edges:
21+
derives_from:
22+
- target: THX-DECOMPOSE
23+
version: 1.0.0

.lattice/requirements/core/001-replace-aws-sdk-middleware-stack-hack-wi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ edges:
2020
derives_from:
2121
- target: THX-SDK-PUBLIC-API
2222
version: 1.0.0
23+
- target: THX-NO-BUFFERING
24+
version: 1.0.0
25+
rationale: The new middleware-replacement path was required to not buffer; streaming-memory test asserts this

.lattice/requirements/core/004-introduce-proxy-fetch----decompose-into-.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ edges:
2323
version: 1.0.0
2424
- target: THX-DECOMPOSE
2525
version: 1.0.0
26+
- target: THX-CORE-VALUE
27+
version: 1.0.0
28+
rationale: proxy.fetch() is the public API surface through which the value prop (stream-without-buffering) is delivered to consumers
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
id: REQ-CORE-005
2+
type: requirement
3+
title: Remove vestigial public proxy.isInitialized()
4+
body: 'Public isInitialized() exists for v3 backwards-compat. After v4 it does void this.gateway.isInitialized() — two indirections to throw if uninitialized. The method''s name suggests a predicate but it throws. Removing simplifies the public API (one less method to document/test) and consolidates ''uninitialized'' detection to the gateway''s lazy client getter. BREAKING but trivial: callers that used it can just call init() and trust the next call.'
5+
status: active
6+
version: 1.0.0
7+
created_at: 2026-05-23T22:57:34.337798+00:00
8+
created_by: agent:claude
9+
requested_by: George Moon <george.moon@gmail.com>
10+
priority: P2
11+
category: CORE
12+
tags:
13+
- cleanup
14+
- breaking
15+
resolution:
16+
status: deferred
17+
reason: Out of scope for the v4 prompt. The method works; removing is cleanup beyond the v4 surface. Revisit when next breaking change PR opens.
18+
resolved_at: 2026-05-23T22:57:34.371684+00:00
19+
resolved_by: agent:claude-2026-05-23
20+
edges:
21+
derives_from:
22+
- target: THX-DECOMPOSE
23+
version: 1.0.0

0 commit comments

Comments
 (0)