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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# Ticket 14 — release gate, incomplete / needs owner information
Spec: spec.md §5. Tickets10–13 have isolated application evidence; none of it
certifies production. CONSIDERATIONS.md in the original checkout was read in
full on2026-11-12. It is a discussion handoff, not approval for customer features.
## Required owner/deployment inputs
- Who may write seals/fonts through DAM/WebDAV? Provide the allowed writers or
decide writes should be disabled. Do not infer a policy from the dev admin role.
- Which isolated native Alpine/OpenRC target may be used, and what trusted proxy
topology/identity header contract/backend isolation will the administrator use?
No maa-1 or shared-service changes have been authorised/performed by this work.
- What database/Redis allocation and namespace/roles are reserved for Signet?
Dev uses private disposable services; generic dev keys/default DB are not a
safe shared-service deployment policy. Do not reconfigure existing services
speculatively.
- What representative PDF/upload/image sizes and concurrent workload should the
native resource tests support? The historical maa-1 sample is not capacity.
- Repository remote and hosted spec/ticket URLs are needed to publish the draft
PR and use correct closing links. No Git remote/gh currently exists here.
## Local incremental hardening (not production acceptance)
Document-save JSON is now limited to1MiB before yyjson parsing. Submit applies
that same byte bound to each stored layout/route in PostgreSQL before libpq
transfers it, so oversized legacy fields cannot reach snapshot cloning. This
bounds the new clone path, not all HTTP buffering, PIM or placement parsing.
Retained regression in test/snapshot-contract.sh accepts exactly1MiB, rejects
one extra whitespace byte with400, and rejects legacy layout/route containing
350,000 multibyte characters (>1MiB) with409 before any snapshot/serial exists.
The old API accepted the oversized request: /tmp/signet-ticket14-json-red.log.
Fresh image signet-roadmap-guards, container of the same name on :8084:
- /tmp/signet-ticket14-build.log: clean -Wall -Wextra build, no warnings/errors.
- /tmp/signet-ticket14-e2e.log and /tmp/signet-ticket14-render.log: all passed,
including identity, snapshot mutation/recovery and the new byte-boundary cases.
- /tmp/signet-ticket14-browser.log and /tmp/signet-ticket14-progress.log: signing
and polling/failure/retry regressions pass. Rendering maths/assets unchanged.
- /tmp/signet-ticket14-rss-summary.txt: approximately32,135KB maximum aggregate
app RSS across730samples. Same UID/process selection as ticket12; ps unit
rounding and sampling can miss short peaks. Excludes PostgreSQL/Redis/client.
This fixture run is not native, concurrent-upload or hard peak certification.
- Image ID in /tmp/signet-ticket14-image.txt; browser evidence in
/tmp/signet-ticket14-{browser,progress}/. Host is Darwin, Git remote absent and
gh unavailable. No proxy/native production checks or publication were performed.
### Bounded external commands
The shared run_cmd now applies a30-second monotonic wall deadline to every
pdfinfo/qpdf call, with or without captured output. Nonblocking bounded reads
keep silent, closed-stdout and flooding children from defeating the deadline.
Each command owns a process group, killed before the direct child is reaped;
WNOWAIT plus temporary SIGCHLD blocking prevents PGID/PID reuse during cleanup.
Exit status must still be0; timeout returns ETIMEDOUT and logs stderr/LOCAL0.
Linux PR_SET_PDEATHSIG kills the direct exec child if the API/worker dies,
including the setup race. No shell, watchdog process or new dependency is used.
This is NOT CPU/RSS/I/O containment. A daemon escaping its process group, or
an orphaned grandchild after caller SIGKILL, still needs service-level controls.
Linux direct-child death protection and timeout/normal-exit group cleanup are
tested; do not generalise that into native OpenRC/coexistence certification.
Retained test/command-contract.{c,sh} exercises truncated/one-byte/invalid output
buffers, nonzero/signalled/missing exec, flood/silence/early stdout close,
background descendants, interrupted waits, SIGCHLD mask restoration and the
ignored-SIGCHLD ownership failure. Linux adds subreaper-backed assertions and
actual caller SIGKILL/direct-child death. The unit-only build uses500ms; installed
apps use30s, verified by an actual hung qpdf in render-contract.sh. Its killed
child is reaped, STAMP_FAILED committed before queue drain, and retry succeeds
with identical proof/stamped bytes.
Latest image/container signet-command-final on :8086:
- /tmp/signet-ticket14-command-build.log: clean -Wall -Wextra, no warnings/errors.
- /tmp/signet-ticket14-command-e2e.log: standalone Linux command checks plus full
identity/API/snapshot tests pass. command-mac.log covers portable unit paths.
- /tmp/signet-ticket14-command-render.log: actual30s hang/reap/retry and all
existing replay/release/enrolment contracts pass.
- /tmp/signet-ticket14-command-{browser,progress}.log: real browser suites pass;
evidence directories use the same prefixes, rendering maths unchanged.
- /tmp/signet-ticket14-command-rss-summary.txt: approximately31,800KB aggregate
app RSS maximum across1,370samples during those fixture suites. Same scope,
exclusions, rounding/sampling and non-certification limits as above.
- Image ID: /tmp/signet-ticket14-command-image.txt. No production services touched.
### Opaque JPEG snapshot regression repaired
Implemented in e4bfba6, integrated in 08394c2; native source bytes match the
verified image. The JPEG fixture's committed blob also matches its raw bytes.
Resource-path review found that pdfw selected JPEG by filename suffix, while
snapshots deliberately name files asset-N. A controlled same-byte test succeeds
with image.jpg and fails with an opaque name before the fix (red assertion in
/tmp/signet-ticket14-jpeg-red.log). get_image now checks the byte signature;
Existing PNG decoding and direct JPEG stream embedding are retained. No filename format
leaks into the snapshot model and no new dependency is introduced.
The new synthetic4x2 RGB JPEG is reproducible from make-fixtures.py using a fixed
encoded swatch, without an encoder dependency. Image-contract tests exercise
named/opaque JPEG and misleading-suffix PNG, PDF validity and interpolation flags.
Snapshot-contract now removes the live JPEG before rendering/retry, extracts the
JPEG from the proof with pdfimages and compares exact bytes to the fixture;
correction/release/damaged-input/replay cases also include it.
The mandatory visual comparison caught nearest-neighbour blocks on the enlarged
swatch versus the browser's smooth image. Colour and alpha XObjects now request
/Interpolate true. Both-page edit/proof/stamped/final plus audit were inspected
again: fitting and image upscaling agree (preview markers intentionally tint the
copy), correct facsimiles persist, and the audit is readable. No text-fitting
algorithm changed. RGB fixture coverage is not certification of every JPEG
colour space, progressive variant or unusual PDF.
Fresh image signet-jpeg-final, container signet-jpeg-loopback bound to
127.0.0.1:18087: clean build with no warnings,
full E2E (image+command+identity+snapshot), render/hang/replay and both browser
suites pass. Logs /tmp/signet-ticket14-jpeg-{unit,build,e2e,render,browser,progress}.log,
image ID /tmp/signet-ticket14-jpeg-image.txt; visuals
/tmp/signet-ticket14-jpeg-browser/. Fixture sampling observed approximately
30,204KB aggregate app RSS across1,306samples, with the same exclusions and
sampling/rounding/non-native/non-concurrency limits above. This does not close
any native deployment gate. No production/shared-service changes were made.
An IPv4/IPv6 overlap with an existing local service was detected on the earlier
:8087 mapping; only our Signet test stacks were stopped, the unrelated service
was untouched. Full suites/browser were rerun on the checked-free loopback port.
Older stacks are retained stopped; ticket11 :8080 remains running as requested.
## Unfinished technical acceptance (must not be checked off)
- Real trusted-header overwrite/spoof prevention, missing identity, authenticated
roles for both APIs and blocked direct-backend access.
- Approved DAM writer enforcement; production PIM authorization.
- Concurrent buffered upload containment (current API cap32MiB), decoded
image/font memory and total child RSS/CPU/I/O. The command deadline above
protects hung external commands, not in-process parsing/rendering or whole
service trees on crash. Service-level containment/native recovery remains open.
- Audit other metadata/PIM/placement parse paths and aggregate buffering; the
save/submit clone guard above is not a whole-runtime memory bound. Oversized
ignored/client-value fields originally amplified snapshot heap use despite the
referenced-text/asset caps. Local resource work is still necessary as well as
native measurement; owner/proxy questions are not the only unfinished work.
- Measure complete application cohort including qpdf/pdfinfo, incremental shared
PostgreSQL/Redis impact, CPU/I/O and recovery, on target-class native Alpine.
Sampling sequential synthetic fixtures is not a hard peak bound.
- Native install/OpenRC lifecycle, filesystem/database privileges, Redis AOF,
production CSP, backup/restore (including private snapshots and facsimiles),
and full acceptance under the actual chosen deployment topology.
maa-1 hosts mission-critical services. Do not use it for uncontrolled stress or
package/config experiments; no production Docker, authentication-server setup,
shared database tuning or customer/OpenSign feature expansion is implied.
## Local implementation/PR state
Integration branch feat/feature-first-roadmap is kept in
/tmp/signet-roadmap-20261112/integration. Original working tree is preserved on
wip/preserved-local-state-20261112, including auth experiments and skill removals.
No branch was pushed and no PR was created or marked ready. Final whole-spec
review/readiness must remain open while this ticket is incomplete.
## 2026-11-14 local follow-up: known technical blockers, not just owner inputs
See `.scratch/resource-audit.md`. Decision placement and pending legacy-layout
parsing now use the existing1 MiB byte guard, with red/green/full E2E/render
coverage. This source-only change has not been installed on preserved :18087.
An explicitly disposable probe held two admitted32 MiB upload requests at their
owned SQL INSERT gate and measured88,888 KiB aggregate application RSS. Budget
failure is demonstrated locally; previous small-fixture samples do not establish
resource safety. Follow-up20 must address buffering/admission without silently
changing the accepted32 MiB policy, then obtain aggregate/native acceptance.
Follow-up19 subsequently repaired PIM's FLUSHDB in integration source, with
scoped reconciliation, ordered mirror writes, queue/foreign-state preservation,
cache-error recovery and two-worker tests; full E2E/render pass. See
`.scratch/pim-resync.md`. NOT installed on preserved :18087; do not invoke its
old Resync action. PDF writer allocation failures still need injected tests/
repair (21). Follow-up20 subsequently repaired the concrete upload counterexample
in source:256KiB application chunks retain32MiB PDF capacity and API/PIM bodies
are capped before kcgi. Two max files with near-cap ignored fields/hash checks
peak29,660KiB versus182,624KiB before repair. Full E2E/render, ownership/retry/
commit-recovery/migration and browser tests pass; `.scratch/bounded-uploads.md`.
NOT installed :18087. Tracker20 remains open for parser/image/font/render
aggregation and native acceptance. Normal frozen-input font bytes share the aggregate
16 MiB snapshot budget; PNGs are decoded sequentially, not64 retained buffers.
Those facts still do not bound the complete concurrently active process cohort.
Tracker23 then repairs dense form parsing before kcgi: non-multipart16KiB,
otherwise multipart1100KiB; logical1MiB fields/32MiB files remain supported.
Three near-cap nested multipart requests with query/cookies peak50052KiB;
full E2E/render/browser pass. `.scratch/bounded-parsers.md`. Mixed renderer and
other metadata/catalog/native gates remain, as do21/22. No production/shared
service or preserved preview changed during this follow-up.