: 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 
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 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
224 
225 
226 
227 
228 
229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
240 
241 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 
267 
268 
269 
270 
271 
272 
273 
274 
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 
286 
287 
288 
289 
290 
291 
292 
293 
294 
295 
296 
297 
298 
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
313 
314 
315 
316 
317 
318 
319 
320 
321 
322 
323 
324 
325 
326 
327 
328 
329 
330 
331 
332 
333 
334 
335 
336 
# Session handoff — 2026-11-23

## Single source tree — supersedes every older worktree pointer below

Canonical checkout: `/Users/saikrupa/Projects/signet`, branch `main`. Previous
linked worktrees are retired; use Git's current HEAD rather than an old path/SHA.
Owner requested one clean tip for review and supplied origin
`git@nply.org:asapien/signet.git`, authorizing push (GitHub is a secondary mirror).
Before changing the old root, its non-Git files were archived/recovered and every
regular-file SHA-256 matched. Recovery pointer:
`~/.local/var/signet-work/current-canonical-root`. Legacy product/config deltas
and build outputs remain there, not silently merged over the tested beta. Existing
cancelled-skill deletions are retained; local settings/tasks are preserved and
ignored. No application/runtime change from cc9e4cf, no new CI/deployment claim.
Read HANDOFF's canonical-checkout section before any historical resume block.

## End-of-session checkpoint

- Published consolidation: fada598 (main and primary origin/main matched). Use
  Git HEAD for later docs-only commits, not a retired worktree or cached hash.
- One clean root, no pending application changes; docs flush adds no runtime code.
- Original root backup and both retired tree archives are private/recoverable via
  current-canonical-root; local settings/tasks remain ignored at the root.
- Owned r5 preview18095 and preserved8080/18087/18090 were left running, with no
  host bind mounts. Verification stack18096 is stopped. Do not stop/upgrade user
  previews merely to end this session.
- No actual Minci CI run or maa-1 deployment. Public domain/auth policies and
  selected-project CI/target setup need resolution if rollout resumes. Reinspect
  current Minci installation/docs: the fc0ea0f inventory below dates2026-11-22.
- Keep resource20/umbrella14 and tickets24–29 open. No real TSA configured; no
  resource/native/SSO qualification inferred from the green fixture samples.

Start next session in the root, check Git status/refs, read CONTEXT/HANDOFF/ADRs
and the beta queue, then follow the owner's next decision. Source review and
merging are finished; do not recreate parallel working trees or reapply the old
prototype delta. No CI, provider setup or production changes during this flush.

## Historical beta preparation —2026-11-22 (superseded by checkpoint above)

Owner authorized a controlled beta despite unfinished sections and requested a
BETA marker plus no username/groups browser prompts. Owner subsequently selected
maa-1, required commit → Minci CI run → deploy, and requested merging all scoped
Signet work to main. Read-only maa-1 inventory confirms Alpine/OpenRC and existing
Authelia/authz but no Signet install. NO production deployment has occurred.
At that inspection, cdg-1 runner fc0ea0f had local recipes/namespaces only and
Minci remote helpers were separate uninstalled WIP. Recheck before rollout;
origin was subsequently supplied and main pushed. CI/target/public-domain setup
is not verified by this older inventory. Read29 and `current-maa1-rollout` evidence;
do not invoke all-project minci-submit or invent an app-owned SSH deploy. Native-
only production, trusted auth, data integrity and shared-service safety still apply.

Main and feat/feature-first-roadmap were merged locally at64e43d2; merge evidence
is `~/.local/var/signet-work/merge-main-20261119.1lCDRN/RESULT.md`. Beta was prepared
in `main-merged-20261119.yQc1lQ` on feat/beta-release, then merged as cc9e4cf.
That linked working tree is retired. The original dirty state is preserved in
current-canonical-root's recovery archive; use only the canonical root now. Start with
`.scratch/beta-release/README.md` and tickets14/20/24–29, not the older recovery
HEAD/status below. Local merge is not a CI run/push/deployment; inspect the latest
merge receipt rather than treating historical no-commit statements as current.

BETA is beside the logo. Startup401 shows inline sign-in state, no credentials
or implicit roles; manual developer headers are loopback-only. Existing full
isolated E2E (including actual cron/RSS), warning-clean build/install, native
Chrome logged-out DOM green/old-client negative/restored-green, refusal/cleanup,
JS/shell/whitespace and upload-client checks passed. Desktop bootstrap screenshot
inspected. Full browser/real SSO/native operational acceptance remains open.
RSS39304KiB is one timestamp app fixture, not a global/native/resource20 pass.

Private evidence: `~/.local/var/signet-work/beta-preparation-20261122.xTja2j9w/`;
`current-beta-preparation` points there. The owned r5 preview is RUNNING18095
with only index.html/app.js/style.css overlaid; exact served bytes match source
and its synthetic released PDF/metadata stayed byte-identical. This supersedes
old all-stopped/closed18095 statements. Preserved8080/18087/18090 untouched. Disposable beta verification stack18096
stopped exit0, port closed; original dirty checkout status/binary diff match the
prior merge-preservation checkpoint. No owned test Chrome profiles/processes remain.
No real TSA provisioned, new dependencies installed, auth bypass/default user,
production changes or memory repair. Ticket20 parent-only candidate remains
rejected/reverted; do not resurrect it or restore old47-file hashes over later
intentional timestamp changes.

## Latest source checkpoint — 2026-11-19

Optional detached RFC3161 timestamp task10 is implemented/source-dev verified;
read `.scratch/detached-timestamps.md`, `docs/timestamps.md` and ADR0003 first.
Owner approved libcurl + OpenSSL libcrypto (not curl subprocesses). Unchanged
released PDF and existing facsimile/sign-off/audit behavior; separate server
and validated TSA times; four total attempts within1h, short-lived cron runner,
explicit trust, no release gate. Disabled by default; no live TSA configured.
Final disposable r5 warning-clean build/full E2E, actual cron/crash/concurrency/
release-independence/access/hash/migration checks and101 source hashes passed.
Timestamp representative sample39784KiB; subsequent32-document A5-only33660KiB.
No browser acceptance: existing optional Playwright cache is pruned; no reinstall.
No commits/publication/deployment/native install/preserved-preview changes.
Ticket20 and its native/aggregate gates remain OPEN. **Product files now include
intentional timestamp edits after the restored47-file final22 parser baseline**;
do not restore them away trying to enforce the older checkpoint's hashes.
Private evidence: `~/.local/var/signet-work/timestamp-implementation-20261119/`.
All five owned timestamp stacks are stopped exit0; fixture queues/locks/processes
clean, :18095 closed. Preserved :8080/:18087/:18090 stacks remain unchanged.

## Representative workload update — 2026-11-18

Owner says most PDFs resemble `~/Projects/salaryprocess/out/a5/`: read-only scan
found32 one-page A5 PDFs,3913–4210bytes, base14 Helvetica/Helvetica-Bold, no
images/forms/JS/encryption. No real payroll contents/files copied to fixtures
or containers. `.scratch/a5-workload.md` records a new synthetic4108-byte A5
32-document create/submit/sign/release probe, with source/final hashes, all29
text rows, A5 body dimensions, seal/facsimile and audit checks. Final sampled
peak33528KiB; warm sample33952KiB; full E2E all passed. Two test files added,
no product change or capacity reduction. Representative sequential evidence
only: all ticket20 failures/native gates below remain OPEN. Owned
`signet-a5-resource-20261118` cleaned/stopped exit0; evidence in private
`~/.local/var/signet-work/a5-resource-20261118/`. Preserve user's source PDFs.

## Latest parser update — 2026-11-18

Ticket20 still OPEN; read `.scratch/parser-coordination.md` next. A parent-only
parse/prune versus worker admission gate was implemented/tested, then REJECTED
and selectively reverted: held-parent exclusion passed51224KiB, but reverse
worker-first order still failed59136/59296KiB with an already-buffering kcgi
child. At that restored checkpoint (before the later timestamp work above),
all47 product inputs were final22-identical; full E2E on restored baseline ended all passed, and baseline red reproduces63112KiB. Only diagnostic
tests/notes survive this session. No normal E2E additions or new product locks
remain. Candidate/native test source and evidence are private under
`~/.local/var/signet-work/parser-repair-20261118/`; do not install its r2/r3 images.
Three owned service stacks (red, r2, r3) cleaned/stopped exit0; r1 failed startup
and remains exited1. No preview/shared/production changes, commits, dependencies,
clock/known_hosts changes or browser/native acceptance. Next design must cover
child buffering BEFORE parent readiness in both orders, not repeat parent-only
locking. Existing no-publication/no-third-party-edit limits still apply.

## Historical recovery —2026-11-17 (not a resume instruction)

Former integration (now retired):
`/Users/saikrupa/.local/var/signet-work/integration-recovery-nQvIoiCL`, branch
`feat/feature-first-roadmap`, HEAD9876b79 plus substantial UNCOMMITTED changes.
The old `/tmp/signet-roadmap-20261112/integration` lost its `.git` and source
files. It is preserved as partial evidence, NOT a usable working tree. Recovery
used the final ticket22 `after/source.tar` into this new durable directory:
all105 surviving product/doc files and61 surviving tool files match; all91
runtime-input hashes and the complete Git status match the saved checkpoint.
Native Git worktree repair reconnects the existing branch, without checkout,
reset or commit. Durable pointer: `~/.local/var/signet-work/current-integration`.
Recovery evidence/partial-tree and registration archives are in that parent.
Original `/Users/saikrupa/Projects/signet` dirty checkout is preserved; do not
replace it, commit its unrelated changes or copy its unsafe identity fallback.

Read CONTEXT.md, HANDOFF.md, docs/adr/, .scratch/bounded-parsers.md,
.scratch/bounded-uploads.md and .scratch/resource-audit.md before coding.
Latest verified source adds tracker22 privacy-safe API logging/capture,
image `signet-logging-final-r2`. Clean full E2E/render and actual container-log
checks pass, including after pool replacement and full container restart.
See `.scratch/api-logging.md`. Owner priority22 →20 →rest;22 is source-only
complete,20 is NEXT/OPEN. Prior mixed fixture's seven samples (max57020KiB)
remain limited evidence, not rerun as native acceptance during22. No new RSS
certificate. Latest test-only20 work reproduces a DIFFERENT unpruned request
window: one admitted35001-field PIM parse held before pruning plus qpdf peaks
60992–62716KiB (>60M bytes), while matched preload controls and the original
retained-upload fixture pass. Product-source47-file hashes remain unchanged.
Full E2E after the final probe passes; this blocker is NOT repaired. See
`.scratch/parser-window.md` before choosing an admission/coordination repair.
Read `.scratch/request-retention.md`, `.scratch/image-memory.md`,
`.scratch/pdfw-allocation.md`; strip-rendering prototype remains rejected.
The earlier `/tmp/signet-roadmap-20261112/parsers`, `fix/bounded-parsers`, predates
tracker21. The older `uploads` worktree also predates the final parser cap;
do not copy either over current integration.

## Next session: start here, in order

1. Enter the durable worktree, not the original checkout or partial `/tmp` copy:

   ```sh
   root=$(head -n 1 "$HOME/.local/var/signet-work/current-integration")
   cd "$root"
   git status --short
   git rev-parse --abbrev-ref HEAD
   git rev-parse --short HEAD
   ```

   Expected branch `feat/feature-first-roadmap`, base9876b79 and a substantial
   dirty tree. Preserve ALL existing changes. Do not reset, checkout old source,
   apply a whole backup diff, prune worktrees or commit/push without approval.
2. Read this file, CONTEXT.md, HANDOFF.md, AGENTS.md and both ADRs; then
   `.scratch/parser-window.md` for the current red loop, controls and limitations.
   Ticket22 is completed SOURCE-ONLY; ticket20 is the active task, not finished.
3. Use the host replay in that note to create a NEW unpublished disposable stack.
   Host `podman` still needs the existing `podman machine ssh` workaround; do not
   edit `~/.ssh/known_hosts`. The current baseline image exists as
   `signet-logging-final-r2`. It contains the previous product code, not a future
   repair: copy the three current diagnostic files when replaying it. Product C
   changes require a fresh image build from THIS worktree/private staging, never
   the original checkout. Preserve the host and VM clocks.
4. Repair the pre-prune overlap without lowering admitted capacities. No
   coordination/admission fix has been implemented or approved as correct yet.
   Existing key registries do not filter kcgi's accumulated unknown fields;
   another post-parse free cannot fix this window. Check idle FastCGI waits,
   child buffers, file/DB/queue lock ordering, permissions and signal/crash
   cleanup before choosing a gate. A repair that blocks the worker needs a
   revised diagnostic release handshake: timeout/unobserved qpdf is NOT a pass.
5. Verify the red input, preload control, ORIGINAL retained-upload case, exact
   RGB/font bytes and full E2E against the candidate; check all owned fixture
   teardown and source/binary identities. Sampling is not native certification.
   Other20 metadata/catalogue/Redis/history/codec/arbitrary-PDF cases and owner14
   native/proxy/DAM/backup gates remain open after this particular repair.

### Permissions and non-goals

Source/test work on disposable development stacks is authorised. Commit, push,
publication, dependency installation, production/native-target work and preserved
preview upgrades are NOT authorised. No Python or replacement JS/Perl/etc.
assistance scripts; use POSIX sh/existing utilities and the established C tests.
Keep32MiB PDF,1MiB JSON/PNG,1100KiB multipart and16KiB non-multipart admission;
keep reference-only inputs, sequential access and edit/proof/stamped fidelity.
Do not resurrect the rejected PNG-strip approach or change qpdf/dependencies to
obtain a passing number without a separately agreed change and fidelity checks.

## Completed, source-only

Signature collections/restart repairs, metadata18, scoped PIM19, chunked PDF20,
dense parser23 and PDF writer allocation21 are integrated uncommitted. Only the earlier authorised
signature/restart upgrade was installed on preserved18087. No commit/push or
production/shared-service deployment happened.

Latest parser23 fix: API/PIM bodies16KiB non-multipart,1100KiB multipart before
kcgi. Large logical fields must use multipart;1MiB JSON/PNG and32MiB PDF files
remain supported. PDFs use authenticated256KiB chunks, migration003 counters,
creator row locks, byte-checked retries and durable guarded publication.

Earlier parser23 tested candidate `signet-parser-final-r2` container
`7dbc0b55d5246e89ba816c25ca645235c9a11c8ab6eae59c25dfbb98709cad85`.
Product/test source SHA matched image and integration at that checkpoint. Clean build/no warnings,
full E2E ends all passed, renderer/hang/replay, exact admission limits, ambiguous
MIME/unknown-length/encoded-prefix checks, browser32MiB two-page/hash/progress/
failure/delete, full signing flow and standalone client all pass.

Original two900KB dense forms:122884KiB RSS; now rejected before parsing.
Three admitted near-cap nested multipart requests plus dense query/cookies:
50052KiB sampled aggregate. Two complete32MiB PDFs:28964KiB, both source hashes
verified. These are fixture samples, NOT mixed renderer/native certification.

## Pending / next action

1. Repo21 completed source-only: deterministic injection reproduced17 failures;
   19 allocation points now pass transient/persistent faults, full E2E/render and
   real browser both-page visual checks. `.scratch/pdfw-allocation.md`.
2. Repo20 remains open; the retained-body counterexample is repaired source-only
   (seven final max4MP/font +two original admitted requests samples <=57020KiB).
   New pre-prune scheduling-window diagnostic now FAILS60992–62716KiB with
   just one PIM request plus qpdf. Fix before claiming20 acceptance; use
   `.scratch/parser-window.md`, not another post-parse free/capacity reduction.
   Request compaction alone still failed59100KiB; large libpq I/O-cache recycling
   at API request end was also needed. Do not reintroduce PNG strips or waive
   the unchanged opt-in probe. Next: active dense parsing/qpdf overlap, other
   metadata/catalog/codec amplification and native representative acceptance.
   `.scratch/request-retention.md`; passing samples are NOT a global certificate.
3. Repo22 complete source-only: both APIs' shared summaries, source sites,
   normalized routes/actors, SQLSTATE-only DB diagnostics and real dev capture.
   Native LOCAL0 persistence/rotation and pre-API server failures are separate;
   `.scratch/api-logging.md`. Continue remaining20, not historical logging work.
4. Tool13: actual affected manager browser identity/groups/list scope unknown;
   no proven route defect. Never widen sequential access to hide the symptom.
5. Tool9 / repo14: owner-approved native Alpine/OpenRC target, proxy overwrite/
   backend isolation, DAM writer policy, DB/Redis allocations and coordinated
   backup/restore/coexistence remain release gates. No maa-1 changes authorised.
6. Tool10 final review/publication blocked by9. No remote/PR URL invented.

## Runtime safety

Last verified runtime state (2026-11-17; recheck read-only if needed):

- `signet-jpeg-loopback`:18087 and `signet-signatures-preview`:18090 return200.
- Old `signet-ticket11-verify`:8080 remains running, but host AND internal HTTP
  checks timed out during ticket22. It started2026-11-12 with lighttpd PID1.
  No cause or repair was established; it was left untouched. Do not describe it
  as healthy, restart it incidentally or infer that the new diagnostics caused it.
- All three `signet-parser-window`, `-control`, `-repeat` stacks are stopped exit0;
  instrumentation/holders/queues=0, no stopped processes, ordinary PIM restored.
- All four earlier `signet-logging-{red,check,final,final-r2}` stacks are stopped
  exit0; logging SQL/Redis/syslog fixtures were cleaned. Images remain available.
- No test stack is an implicit replacement preview. PHP:8087 remains unrelated.

Preserved `signet-jpeg-loopback` at127.0.0.1:18087 remains unchanged/HTTP200.
DO NOT invoke its PIM Resync: installed version STILL uses FLUSHDB. Metadata18,
PIM19, upload20, parser23, PDF-allocation21, writer-memory20, API-retention20
and API-logging22 are NOT installed there. Any later upgrade needs
separate approval and coordinated API/browser/web-config/migration003 deployment
with verified DB/files/queues/config backups. Do not roll an old API over an
incomplete upload, or restore stale backups over newer user activity.

Owned upload/PIM/parser investigation containers were stopped gracefully and
retained, not deleted. PDF-allocation21 containers are also stopped/retained:
final service stack graceful, idle native-test shell required SIGKILL fallback.
All four owned image-memory20 investigation containers are also stopped/retained
(gracefully). All five qpdf/retention investigation stacks also stopped/retained
with exit0; latest `signet-request-retention-final-r2` (temporary18110) is NOT a
replacement preview. Trigger/holder counts0; source/image manifests match88 files.
All three newer parser-window stacks also stopped exit0 after zero
instrumentation/holders, empty queues, normal PIM pools and no stopped processes
were verified. Preserved18087/18090 still return200. Preserve ticket11:8080,
signature preview18090 and the unrelated PHP:8087. Destructive fixture tests only on explicitly disposable
stacks, never preserved/shared services. Do not change host clock/known_hosts.

## Durable evidence

Private0700 directories, files0600; never commit/publish backups:
- `/Users/saikrupa/.local/var/signet-feature-backups/bounded-parsers-20261114T191422Z`
- `/Users/saikrupa/.local/var/signet-feature-backups/bounded-uploads-20261114T181856Z`
- `/Users/saikrupa/.local/var/signet-feature-backups/qpdf-image-strips-20261115T031645Z`
  (name reflects rejected prototype; retained repair is API request/cache cleanup)
- `/Users/saikrupa/.local/var/signet-feature-backups/api-logging-20261116T170748Z`
- `/Users/saikrupa/.local/var/signet-feature-backups/parser-window-20261116T193934Z`
  (UTC label; local work2026-11-17, unrepaired pre-prune window counterexample)

Contain pre/post source/patch/status, source/image manifests, logs and synthetic
browser evidence. They are source backups, not runtime user-data backups.
Latest durable live evidence is under `~/.local/var/signet-work/`:
`parser-window-*.log`, `parser-window-product.sha256`, `parser-window-cleanup.sh`,
recovery comparisons, `partial-integration.tar` and `integration-registration.tar`.
`parser-window-backup-path` points at the latest private phase archive. Its
`after/source.tar` is refreshed for this handoff; `after/status` and full diff
include earlier dirty work, while `after/probe-only.diff` isolates the three
current diagnostic test files. Consult its private README before selective recovery.

Old `/tmp` logs/screenshots are expendable and may disappear. Prefer the private
archives over `/tmp/signet-parser-final-*.log` or old browser evidence paths.
The recovery cause was not diagnosed; do not assume that moving/reading an old
`/tmp` path makes its missing files safe again.

Host browser tests can reuse read-only Playwright Core at
`/private/tmp/minci-browser-check/node_modules/playwright-core/index.mjs` and
Chrome `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`.
These were earlier development facilities, not reverified in the latest
parser-window phase. Check availability and policy/approval before invoking;
no browser run or visual change is claimed for this diagnostic-only slice.
Old `/tmp/signet-ticket10-browser/node_modules/...` disappeared. No production
Node/browser dependency was added. Native packages/tooling remain unchanged.