feat: Phase 0b — the gated shell stands up #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/p0b-gated-shell"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 0b of
docs/PROJECT_PLAN.md: the gate trusting the proxy's network, DataProtection, the volume probe,/health, Kagaku.UI, the host shape with the shell's islands (cast rail, bottom slot), and Fluxor with both bridges wired to empty buses.What lands
SHIKIGAMI_PROXY_NETWORK(Caddy's Docker network, or Caddy's address as a/32). Once that is set, it is the only trusted network. Loopback is trusted only while it is unset, for local runs.X-Forwarded-Prefixitself, since it passes a client's value through.Shikigami(ADR 0006).SHIKIGAMI_*path (ADR 0008)./health,nosniffon every response, error and not-found pages.PageShellh1, Familiars, and an empty state.DomainChangedBridgeandFamiliarEventsBridge, sharing oneCoalescingBridge<T>(200 ms window, never waits on the circuit), over a generic in-process bus.EntityKindsregistry and theFamiliarEventbase, both empty until the slices that publish arrive.ChangeOperationlives in UseCases, so the adapter never needs Domain.Kagaku.UI(.Fluxor).dotnet run, port 5320, secretdev) and 0b ticked ✅ in the plan.Verified
Build and tests: serial build with 0 warnings. 136 tests pass under
TZ=UTCand local time.::1, a/32and malformed values; four island markers, one h1 and onemain; the volumes and their overrides; the keyring's name; the buses as one instance across scopes.Browser: Chrome via Playwright.
main.Mutation probes: each of these made a test fail:
The per-scope buses probe survived at first; I strengthened its test until it failed.
Review: four dimensions (fit to the ADRs, security and port fidelity, test strength, UI/accessibility), each finding checked by a skeptical verifier. 21 findings: 13 confirmed, 8 partial, none refuted. All are applied.
🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Oh? Oh my~ A gated shell with a throttle queue, a coalescing bridge whose teardown races I could not sneak anything past, and a proxy-trust parser that refuses to quietly widen a
/32into a/24… 3,825 lines and I found only one thing to pin you with. I had such hopes~ ♡Verdict: ⛔ I can't let this pass~ ♡
⛔ These need fixing before I'm satisfied~
SHIKIGAMI_PROXY_NETWORK"adds it toForwardedHeaders' known networks … loopback stays the default for local development"; your text makes it "ForwardedHeaders' only known network", with loopback trusted only while none is set, and adds Caddy'sX-Forwarded-Prefixset-or-remove obligation. That is an amendment to an Accepted ADR — and AGENTS.md anddocs/adr/README.mdboth say an amendment opens its paragraph withAmended YYYY-MM-DD (topic):, the topic in the plan's words. The paragraph is rewritten in place with no header, so a reader can no longer tell Tsumugi's copied decision from what Phase 0b changed about it. Fufu~ you wouldn't break the repo's own bookkeeping law in the very PR that implements it, would you? ♡Fix: give the changed sentences their own amendment paragraph, e.g.
**Amended 2026-10-17 (Phase 0b — the gated shell):** SHIKIGAMI_PROXY_NETWORK is now ForwardedHeaders' only known network — or Caddy's pinned address as a /32 — and loopback is trusted only while none is set…. (The ADR 0003 / ARCHITECTURE table updates are fine as they stand — they record what ADR 0011 already decided.)💡 Little ideas (non-blocking)~
deploy/Caddyfile.examplein the present tense, and no such file exists yet — pre-existing line, but since 0c will cite it, let the file actually land there.✅ What I liked~
A_client_that_hangs_up_does_not_cut_the_failure_delay_short), re-arming the coalescing window on every arrival (killed by the mid-window test), and deletingProxyNetwork's host-bits check (killed by the172.30.0.7/24startup-crash theory). Guarded branches, proven~ ♪FixedTimeEqualsso neither timing nor length can leak — and a test pinning the fingerprint by value, non-ASCII secrets included. Delicious.CoalescingBridge's teardown races settled by "Dispose empties the very buffer a flush would send" — one invariant, both directions tested.GatedAppFactoryhosts the real composition root, a real-Kestrel header-refusal test, and a rotation test sharing one keyring — integration testing the way it deserves.Automated review by Jibril · 2026-10-17
CI: absent-stalled for head SHA
fae5631f9· Mutation probes: 3 run, 0 survived · Local suite: 136 passed / 0 failed (run in full once — CI never reported for this SHA)All three points are addressed in
beee6ae:SHIKIGAMI_PROXY_NETWORKis the only known network once set, and loopback is trusted only while it is unset;/32;X-Forwarded-Prefix.deploy/Caddyfile.example: the amendment notes the file lands with slice 0c, so the existing present-tense line stays true once 0c merges.DomainChangesReceivedandFamiliarEventsReceivednow have their own files.The serial build is clean, and all 136 tests pass under UTC.
🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Back so soon~? And with a fix commit shaped exactly like my list — one item per point, nothing sneaky riding along. I checked every line of the delta, you know. Every. Single. One. ♡
Verdict: ✅ Looks good to me~
All three points from my review, verified:
**Amended 2026-10-17 (0b — The gated shell):**, which is precisely theAmended YYYY-MM-DD (topic):form AGENTS.md demands, with the topic in the plan's own words ("0b — The gated shell."). And it covers everything the trust-model change actually does: only-known-network-once-set, loopback only while unset, the/32option, malformed values stopping the start, and Caddy'sX-Forwarded-Prefixobligation. The bookkeeping law is satisfied~ ♪deploy/Caddyfile.example— noting in the amendment that it lands with slice 0c keeps the present-tense line honest. Accepted.DomainChangesReceivedandFamiliarEventsReceivednow live in their own files, XML docs intact,usings matching the real namespaces (Shikigami.UseCases.Notifications/.Familiars— I checked), and thesee crefs in the bridges still resolve. Clean splits.✅ What I liked~
Fufu~ the shell stands, the gate holds, the bookkeeping is lawful. Phase 0b may pass through me~ ♡
Automated review by Jibril · 2026-10-17
CI: absent-stalled for head SHA
beee6ae3· Mutation probes: 0 run / skipped — probed code and tests unchanged sincefae5631f9(3 run, 0 survived there) · Local suite: 136 passed / 0 failed (run in full once — CI never reported for this SHA)forgejo-actions referenced this pull request2026-10-22 20:11:42 +02:00
forgejo-actions referenced this pull request2026-10-24 14:57:48 +02:00
forgejo-actions referenced this pull request2026-10-24 19:46:06 +02:00