wiki: passage confirmation — zone PoC, flow and relay rules, trials, hardening list

- passage-confirmation: unexplained passages as the audit witness and the
  phase-1 order (2026-11-19), first recordings, and the decisions of
  2026-11-22: the zone flow (last crossing counts, no decision while the zone
  is busy, an uncrossed open is abandoned) and the read-then-fire relay rules.
- zone-anpr-poc: the prototype on park-lab, its builds, the live R2 trials and
  the turn-back judged as passed; park-lab as the worst-case site.
- zone-anpr-plate-trials: plate reading measured (inverting does not help; the
  still is the main reader; the plate reads only on a short stretch of the
  approach), the day and wet-night trials, and the two fixes that followed.
- zone-anpr-poc-review: the code review of 2026-11-21 with a status table of
  what the later builds fixed.
- vision-hardening: the work list the user deferred to another session.
- zkteco-cmp200-barrier, append-only-event-chain, reconciliation,
  open-questions, overview, index, log: cross-references and updates.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5oZdzvo92Eouc9eRv5
This commit is contained in:
2026-11-22 18:24:48 +01:00
parent ce10c741fc
commit 726dd9803a
12 changed files with 1446 additions and 9 deletions
+217
View File
@@ -3760,6 +3760,33 @@ own channel from the start, and early frames are held until the open. Not yet ch
desktop app. Also recorded that both park-lab cameras now push to the dev machine. Updated
[[desktop-shell-tauri]], [[camera-live-view]], [[passage-confirmation]].
## [2026-11-19] decide | Passage confirmation — unexplained passages as the audit witness; phase 1 reordered
User proposed that a vehicle crossing the line with no ticket, subscription or other signed open
behind it, e.g. after the operator raises the boom with a remote, be recorded with its plate as an
anomaly for audit. Agreed and recorded:
- the matching rule: one signed open covers one crossing;
- `anomaly` reason `passage.unexplained`, kept unsigned in `device_events` until crossings are
proven, and shown in reports and the Z-report;
- the abandoned verdict marks its open used;
- unwatched periods are recorded.
Phase 1 reordered to: crossing detection → unexplained passages → abandoned verdict with a dry-run
close → the real close last. Updated [[passage-confirmation]], [[append-only-event-chain]],
[[reconciliation]] and the index.
## [2026-11-19] query | Passage confirmation — first recordings (AA890XX entry, exit, turn-back)
Started a dev clip recorder (both cameras, around each server event). The user drove AA890XX in,
out, then in-and-back. A YOLOX and IoU-tracker prototype over the clips:
- the entry camera saw in (A → B), out (B → A) and the turn-back (A → B → A); the ledger recorded
the turn-back as an entry;
- the entry line sits where cars stop (crossed before the open), and the exit line is off the
cars' path;
- the boom is visible in the exit camera's view.
Recorded on [[passage-confirmation]].
## [2026-11-20] query | park-2 disk growth — backups, pass samples, and the snapshot valve
User asked how long before park-2's disk fills (`parking.sqlite` 6.1 GB and growing). Measured
@@ -3784,3 +3811,193 @@ so the disk reaches 70% again around 2026-12-05. The user deferred the code fixe
feature work on `stage` is deployable. Recorded the new state, the next deadline and the
corrections from the code review (freeze length, compression, no threshold knob, partial files)
on the page.
## [2026-11-21] query | Dingtian "Mutually Exclusive" vs the close interlock
The board mode makes the last relay command win (a close cuts a held open); the series wiring makes open win. Recorded on [[zkteco-cmp200-barrier]]; R2 stays dry-run in the zone PoC.
## [2026-11-21] query | Zone ANPR PoC — night drive, the close rule, exit camera dropped
The user drove AA927AU on park-lab with R1 live and R2 as a dry run, confirming each move live.
The entry camera judged every move right, including nose over the line and reverse. The user set
the close rule: abandoned and zone free means R2 at once, with no dwell or window. The exit camera
was dropped because the rising boom crosses its image and its line is off the path. On the way:
- a lane lock for the shared lane;
- the visit ends when the zone is free, not when the car leaves the view;
- plate reads moved off the tracking loop, with backoff after the camera answered 503 and
`digest auth failed` under load;
- detection on the whole frame;
- separate start and keep detection thresholds.
Wrote [[zone-anpr-poc]]. Updated [[passage-confirmation]] (field trials section; the dwell/window
open question closed) and the index.
## [2026-11-21] query | Zone ANPR PoC — code review
The user asked for logical flaws, bottlenecks and bugs in `poc/zone-anpr`. The tracking logic was
replayed offline with a scripted detector and a relay stub; park-lab was not touched. Main
findings: the verdict does not know how a visit ended, so a car the detector loses, or a track
that breaks, is judged abandoned and closes; "zone free" looks only at the tracked car; the lane
lock gives a second open in two cases and starves a waiting car in a third; the still opener dies
permanently after six failed stills in a row, the likely source of `digest auth failed` (not yet
checked against the park-lab log).
Wrote [[zone-anpr-poc-review]]. Noted the correction and the open item on [[zone-anpr-poc]];
updated the index.
## [2026-11-22] query | Passage confirmation — the zone flow and the relay rules
The user set the flow: A → B is in, B → A is out, only the last crossing counts, and nothing is
decided while the zone is busy. When the zone becomes free, a last crossing of A → B is passed;
anything else is abandoned and fires R2. The close does not look at the boom: a close on a closed
boom is expected to do nothing, so no boom-position signal is wired for it.
Recorded on [[passage-confirmation]] ("Decided with the user (2026-11-22)"), with three points
from [[zone-anpr-poc-review]] listed as not settled (what counts as busy, a lost vehicle, the
B → A drive-out on park-lab) and the open-wins relay order as proposed. Noted on [[zone-anpr-poc]]
that its flow table is replaced, on [[zone-anpr-poc-review]] that "moving away" is gone, and on
[[zkteco-cmp200-barrier]] that the limit contacts are not needed for the close. Updated the index.
## [2026-11-22] query | Relay rule — read the status, then fire
The user set the rule: read the board's status, and pulse a relay when the other one of the pair
is off. Recorded on [[passage-confirmation]] ("Relay rules"), replacing the proposed order. What
happens when the other relay is found on, or the read fails, is listed there as proposed.
## [2026-11-22] query | Relay rule — the other relay reads on, or the read fails
The user set both cases. The other relay reads on: send off, read again, fire once it reads off,
otherwise keep trying. The read fails: check that the controller is online; if so keep looping,
if not flag the relay offline. Recorded on [[passage-confirmation]] ("Relay rules"), with the
contradiction against "open wins" noted there and three details left to define.
## [2026-11-22] query | Zone ANPR PoC — the new flow and relay rules built, R2 live trial
The user asked for the 2026-11-22 flow and relay rules in the PoC, with R2 live this time.
`poc/zone-anpr/zone_anpr.py` was changed locally: a visit is a busy period of the zone, the last
crossing decides when the zone is free, and the relays follow read-then-fire with an online probe
and a check before every datagram. Three defaults the user has not ruled on are in the build: a
car that vanishes inside the zone gives no close, busy looks at the camera's own zone, and a
drive-out is abandoned. `test_flow.py` (44 checks) passes. The recorded night drive was replayed:
passes stay passes, the abandonments recorded after the tracking fixes still close, and the
drive-outs now close too. One status read against the real board confirmed the reply format.
park-lab was only read; nothing was deployed or armed.
Wrote the build section on [[zone-anpr-poc]], with the R2 preconditions that are still unmet.
Updated [[passage-confirmation]], [[zone-anpr-poc-review]] (status table) and the index.
## [2026-11-22] query | Zone ANPR PoC — the 2026-11-22 build deployed to park-lab
The user said to deploy. The previous file and config were backed up on park-lab, the new
`zone_anpr.py` and `test_flow.py` copied, `close_live` set to true, and `zg2` restarted at 09:56
UTC. It came up disarmed, both streams live, the relay board answering with all relays off; the
44 checks pass inside the container. Arming is left to the user. Recorded on [[zone-anpr-poc]].
## [2026-11-22] query | The space under the boom is the barrier's concern
The user: the barrier always has radar or infrared sensors under the boom, and it will not come
down on something whatever the relay commands. Recorded on [[passage-confirmation]] ("Relay
rules") and [[zone-anpr-poc]]; the pre-arming check of the zone against the boom is dropped. The
bench test of the reversal on the park-lab unit is still listed as not run.
## [2026-11-22] query | Zone ANPR PoC — close_on_lost switched on, on park-lab
On the user's instruction `"close_on_lost": true` was set in park-lab's config and `zg2` restarted
at 10:00 UTC. The relays were armed from the page at 10:00:50, with the close live. Recorded on
[[zone-anpr-poc]].
## [2026-11-22] query | Zone ANPR PoC — first live R2 pulses
The user drove on park-lab with the close live: one crossing (passed, no R2) and two abandonments,
the second after standing in the zone for almost three minutes. Both gave `abandoned` and a live
R2 that the board acknowledged. The exit camera fired a second R1 for the car that had passed.
Recorded on [[zone-anpr-poc]] ("Live R2 trial"); what the boom did awaits the user's word.
## [2026-11-22] query | Zone ANPR PoC — live R2 confirmed by the user, second run
The user confirmed that the boom came down at every abandonment. Second run: a drive-in (passed,
no R2), a drive-out (handled by the exit camera, which opened and has no close) and an abandonment
(R2 sent). Added to the trial table on [[zone-anpr-poc]].
## [2026-11-22] query | Zone ANPR PoC — a turn-back judged as passed
The user stood at the boom for three minutes and reversed; the PoC said passed. Cause: the entry
camera does not see the boom, the waiting car showed only as a strip at the picture's right edge,
right of the line and mostly outside the zone, which ends short of the edge. The exit camera then
took the lane, so the reversal was not seen. A replay with the zone drawn to the edge judges both
continuations right. Recorded on [[zone-anpr-poc]].
## [2026-11-22] query | Would inverting the picture help night plate reads?
No. The plate reader was run on the recorded night frames, as recorded, inverted, contrast-
stretched and darkened. Inverting halved the good reads on the approach and changed nothing on
the standing car, where every variant read nothing right. The standing plate is not overexposed;
it is seen almost edge-on (26–40 px wide against 82 px on the approach). Recorded on
[[zone-anpr-poc]] ("Plates at night"), correcting the "burnt white" note there.
## [2026-11-22] query | Plate reads from the stream frames — built, and an earlier claim corrected
The user agreed to read plates from the stream frames during the approach, with the hi-res still
as a second source, and asked for it in the PoC. Built: two sources voting in one consensus, the
stills able to decide alone, a size gate for stream reads, caps that count only while the car
stands, kept still crops, a new HTTP client per still, and per-read and per-visit records of the
source and the time taken. `test_flow.py` has 57 checks.
**Correction:** the previous entry's basis, 38 of 46 stream frames read right on one visit, did
not hold for the night as a whole. Replayed over all 20 entry visits, the stream alone decides 3
and the stills decided 8. The stills stay the main reader; the stream adds speed. Corrected on
[[zone-anpr-poc]] ("Plates at night").
## [2026-11-22] query | Zone ANPR PoC — the plate build deployed to park-lab
Deployed at 11:15 UTC after the 57 checks passed inside the container; `zg2` came up disarmed,
both streams live. The speed trials by day and by night are still to be driven. Recorded on
[[zone-anpr-poc]].
## [2026-11-22] query | Zone ANPR PoC — day trial of the plate build
The user drove a pass and abandonments at higher speed. Verdicts and relays were all right (four
live R2). Plates were worse than in the morning: two of six entry visits decided, after 4.8 s and
5.8 s. The car is already close and side-on a second into the visit, stills timed out 9 times in
67, and the stream gave four votes. Speed and the new still pacing changed together, so their
shares are not known. Recorded on [[zone-anpr-poc]] ("Plates at night", day trial).
## [2026-11-22] query | Reading the plate before the visit starts — what can go wrong
The user asked what happens to the reading of a car that turns away before the zone, and what
starts the reading of the next car. Answer: a reading belongs to a followed vehicle, is dropped
when its track ends outside the zone, and each vehicle starts its own. The risk is votes crossing
from one car to another. Recorded on [[zone-anpr-poc]] as constraints on an idea that is not built.
## [2026-11-22] query | Why the morning plate reads were better
The plate reads only while the car's front edge is left of about x = 900 of 1280; beyond that the
car is side-on. Reading starts when the car enters the zone, at the end of that stretch. In the
morning the car was slow enough for three stills there; at midday it had passed by the first
still. The zone redraw, the still crop and the timeouts were checked and ruled out as the main
cause. Recorded on [[zone-anpr-poc]] (day trial).
## [2026-11-22] query | Zone ANPR PoC — night trial of the plate build, wet lens
The user drove at night with a wet lens. From the recorded frames: one pass and three
abandonments with the relays armed. The abandonments were judged right and closed. The pass
(16:27:00) was judged abandoned and R2 fired behind the car: one last blurred box on side A
decided it; without that frame the replay says passed. One plate was decided wrong (`A927AU`,
three sure stills, the flare covering the first letter). Day and night are side by side on
[[zone-anpr-poc]] ("Plates at night"), with two fixes named and not built.
## [2026-11-22] query | Zone ANPR PoC — the two night fixes built and deployed
The user asked for both fixes. A side now counts only after two looks in a row, with the leaving
edge judged on the last agreeing box and one exception for a car driving out of view; a read does
not vote when the picture is burnt out beside the plate. 65 checks pass. Replayed over all 39
recorded entry visits, 37 are unchanged, the 16:27 pass is judged right, and one three-frame visit
of 2026-11-21 changes with the truth unknown. Deployed at 16:54 UTC; `zg2` came up disarmed.
Recorded on [[zone-anpr-poc]].
## [2026-11-22] query | Zone ANPR PoC — second night run, after the fixes
From the recorded frames: two drive-throughs judged passed (fix 1 held), the abandonments judged
abandoned and closed. The glare check barred the burnt-out flare, but two other sure and wrong
reads got through: the rear plate at a steep angle (`AA927AJ`, decided) and a hazy flare ghost
over the first characters (`27AU`). A glare box started a visit with no car at the line: R1 then
R2 within two seconds. Recorded on [[zone-anpr-poc]] ("Plates at night", second night run).
## [2026-11-22] query | Vision hardening — the work list, deferred to another session
The user closed the PoC trials and asked for the further hardening to be written down and left
for another session. Wrote [[vision-hardening]]: where things stand, the open items with their
evidence (glare boxes, reading before the visit and its identity risks, hazy flare and steep-angle
misreads, the lost-car rule, the exit camera, relay and barrier preconditions), a possible order,
and how to pick it up. The plate material moved from [[zone-anpr-poc]] to its own page,
[[zone-anpr-plate-trials]]. The recorded drives of both days went into the repository with a
replay (`poc/zone-anpr/recordings/`, 48 visits; 20 of the 21 with a known truth are judged right).
## [2026-11-22] lint | Passage confirmation and the zone PoC pages
Checked before committing: every page is in the index and has frontmatter; the five PoC pages
link to each other and are reached from [[passage-confirmation]], [[open-questions]] and the
overview's reading paths; stale statements on [[zone-anpr-poc]] (uncommitted code, the dry-run
close, the finished trial list) were brought up to date, and the review's status table now shows
what the later builds fixed. Corrected a count: 5 plates decided in 11 wet-night visits, not 12.
Found and left alone, as they predate this work: two pages with no inbound link
([[ds-2cd1047g3h-liu]], [[blocklist]]), and six links to pages not yet written
(`access-direction-is-per-relay`, `booth-deploy-networking`, `dingtian-http-api-unauthenticated`,
`g3h-anpr-push-gotchas`, `occupancy`, `snapshot-storage-optimization`).