: asapien/signet

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
# Dense parser admission — follow-up23 of20 (2026-11-15)

## Verified local repair, not a native certificate

Two900000-byte URL-encoded POSTs to a nonexistent route reached122884KiB
aggregate application RSS; two text/plain requests reached92252KiB. They all
returned404: handler validation/route rejection is too late. An earlier30000-byte
URL-encoded control peaked27876KiB, and a1004507-byte multipart control36920KiB.
Idle residency returned to about25MiB: the dominant issue is transient per-field
allocation, not retained upload files. kcgi0.13.4 sends each parsed field to its
parent, which reconstructs a kpair and strings; validators do not discard these
allocations. No upstream/vendor file is modified.

Evidence: `/tmp/signet-parser-{red,small,text,multipart,nested}.log` and
`/tmp/signet-parser-contract-red.log` (HTTP404 expected413 at16385 bytes).
Experiments/signals affect only owned disposable stacks, not preserved18087 or
other shared/production services. Worktree `/tmp/signet-roadmap-20261112/parsers`,
`fix/bounded-parsers`, base9876b79 plus the complete uncommitted integration.

## Minimal fix

Both lighttpd configs match every API/PIM FastCGI prefix, including unknown or
normalised suffixes. Before kcgi runs:

- Non-multipart request bodies: **16384 bytes (16KiB)** maximum.
- `multipart/form-data; ...`: existing **1100KiB** maximum, case-insensitive.
- DAM/WebDAV transport remains34000KiB; no writer or organisation ACL is added.

This explicitly changes transport compatibility for large URL-encoded/plain/
unknown bodies. Send large logical fields using multipart. It does NOT lower
1MiB JSON/PNG field limits or32MiB complete PDF capacity; frontend FormData and
PDF application chunks already use the supported encoding. The former large
URL-encoded snapshot test now sends the exact same JSON bytes via multipart;
exact-limit acceptance and one-byte-over API400 are retained. Small forms and
empty POSTs still work. No schema/API-role/signing/rendering changes or runtime
dependencies are introduced.

The admission decision must be retained at the actual backend web server.
Socket isolation/proxy overwrite/native config are still release gates. This is
not a claim that request-byte limits bound every parser/JSON/SQL/catalog/codec
allocation, or that multipart alone certifies mixed rendering below60MB.

## Tests and final source

Final candidate `signet-parser-final-r2`, container
`7dbc0b55d5246e89ba816c25ca645235c9a11c8ab6eae59c25dfbb98709cad85`,
loopback18103 during verification. Logs `/tmp/signet-parser-final-{build,e2e,render,rss,upload-rss}.log`.

- Clean native build, no compiler warnings; E2E ends **all passed**, full renderer
  contracts/hang/recovery/replay pass.
- `test/parser-contract.sh` covers exact16384/16385 dense body boundaries,
  URL-encoded/plain/unknown content types, spoofed multipart-prefix rejection,
  encoded/unknown API and PIM paths, unknown-length chunked transfer, ambiguous
  duplicate Content-Type rejection, case-insensitive real multipart admission,
  and the retained1100KiB multipart cap.
- Opt-in `test/resource-parser-probe.sh` runs two API workers plus one PIM worker
  concurrently. Large dense bodies are rejected413; exact16KiB dense bodies are
  admitted to the unknown route. A1120092-byte nested multipart contains35000
  very short parts inheriting one outer name, plus1000 query and1000 cookie
  pairs per request. Baseline23848KiB, sampled peak **50052KiB (51253248bytes)**.
  Includes signet/signetd/lighttpd UID cohorts and kcgi helpers; excludes root
  clients/sampler/PostgreSQL/Redis. Sample interval is1ms sleep PLUS /proc scan,
  not an absolute atomic peak certificate. Probe fails for zero/exceeded samples.
- Original two32MiB upload probe still completes and independently verifies both
  source hashes, near-cap ignored fields and raw/HTTP-chunked oversized request
  rejection: sampled peak **28964KiB**. Existing1MiB metadata/signature contracts
  still pass. Whole file capacity is preserved.
- Real browser exact32MiB valid two-page PDF/hash/progress/conflict/delete and
  full edit/proof/placement/check-only/enrolment/release/event signing flow pass:
  `/tmp/signet-parser-{browser,signing-browser}{.log,/}`. Standalone real client
  helper tests pass too. External dev-only Playwright reused read-only from
  `/private/tmp/minci-browser-check/node_modules/playwright-core/index.mjs`;
  previous temporary module path had disappeared. No package install/runtime
  dependency was added.
- Test RSS helper now emits readiness only after installing signal handlers AND
  its first scan. New probe waits for it, avoiding a false startup SIGTERM/143
  when immediate413 responses finish before the sampler starts. One-shot output
  remains unchanged. Diagnostic prototypes live outside product source in
  `/tmp/signet-upload-investigation/`; no debug production instrumentation.

Product and test source SHA256 matches the final image exactly:
`/tmp/signet-parser-{host,image}.sha256`. Source integration is selective and
uncommitted; private0700 backup (files0600)
`/Users/saikrupa/.local/var/signet-feature-backups/bounded-parsers-20261114T191422Z`
retains pre/post integration source, patch/status and synthetic test/image/
browser evidence. It is not a runtime user-data backup.

## Remaining work

Tracker23 is the verified parser-density slice. Parent20 remains OPEN for
metadata/catalog amplification, aggregate image/font/render and native/mixed/
coexistence certification. PDF writer allocation-failure21 and actual failure
logging/capture22 remain open. Native target/workload/DAM/proxy/namespace and
coordinated rollback gates remain; no production readiness is implied.

No preserved-preview upgrade, commit or push. Old18087 PIM Resync still uses
FLUSHDB and must not be invoked. Any later installation must coordinate the web
caps with the previously integrated chunk API/browser/migration003; no old API
rollback over incomplete uploads. Source/test evidence backups are separate
from actual runtime user DB/files/queue/config backups.