Skip to content

docs: close out ADR-0001 — installer + FINDINGS + close #43/#51 (Child C — refs #54)#60

Merged
thinmintdev merged 1 commit into
mainfrom
docs/adr-0001-c-housekeeping
May 17, 2026
Merged

docs: close out ADR-0001 — installer + FINDINGS + close #43/#51 (Child C — refs #54)#60
thinmintdev merged 1 commit into
mainfrom
docs/adr-0001-c-housekeeping

Conversation

@thinmintdev
Copy link
Copy Markdown
Contributor

Wave 2, Child C of ADR-0001 — the documentation pass for the auth collapse. No code touched; the entire diff is markdown.

Refs the three-PR sequence:

What changed, per file

installer/README.md

  • Rewrote the ## Authentication section: single FastAPI layer, no edge-auth, password set via dashboard wizard (POST /api/auth/password, public on first run), Bearer tokens for programmatic clients.
  • Documented --no-tls — skips Caddy, FastAPI binds 0.0.0.0:8080, reachable at http://<host>:8080/. Note that --dev implies --no-tls.
  • Dropped every mention of --auth=basic, HAL0_ADMIN_USER, HAL0_ADMIN_PASSWORD, HAL0_HOSTNAME, HAL0_AUTH_ENABLED, Caddy basic_auth, htpasswd.
  • Renamed HAL0_HOSTNAME → HAL0_PUBLIC_HOST in the env-var table.
  • Added an Upgrade notes (pre-v1) subsection: existing --auth=basic installs lose edge auth on upgrade; mitigation is set a password in the wizard OR --no-tls and front with your own reverse proxy.
  • Acceptance grep clean: git grep -i basic_auth installer/README.md → no hits.

PLAN.md

  • §1 "Auth + reverse proxy" rewritten for the single FastAPI layer with an explicit Trust posture paragraph: open on the LAN by default, password auth opt-in via wizard, Bearer tokens unchanged from Enforce write scope across admin routers (require_writer split) #29.
  • §10 (harness flags) renamed HAL0_HARNESS_AUTH → HAL0_HARNESS_TLS to match what scripts/harness.sh and installer-test.sh actually read.
  • No remaining PUBLIC_PATHS mentions; remaining edge auth mentions are descriptive (referencing the ADR / describing what Caddy no longer does).

docs/api-errors.md

tests/harness/FINDINGS.md

README.md (repo root)

  • "Auth posture" subsection brought in line with the new model. Not in the spec's target list, but it was stale after Child B and would have contradicted installer/README.md. Small consistency fix.

tests/harness/README.md

  • Opt-in flags table + status vocabulary updated for HAL0_HARNESS_TLS. Same rationale as README.md: the old HAL0_HARNESS_AUTH knob doesn't exist in the scripts anymore, so the doc was wrong.

Acceptance checks

$ git grep -i basic_auth installer/README.md          # → no output (exit 1)
$ git grep -n PUBLIC_PATHS docs/ installer/ PLAN.md   # → only the ADR + a code comment in install.sh
$ grep '^## 10\.' tests/harness/FINDINGS.md
## 10. Caddy basic_auth swallows the PUBLIC_PATHS allowlist — **critical / bug** · ✅ FIXED BY ARCHITECTURE REMOVAL (ADR-0001)

The ADR (docs/adr/0001-...md) mentions PUBLIC_PATHS / --auth=basic / basicauth by design — it's the historical decision record. The spec explicitly says "Do NOT alter the ADR itself." Similarly, installer/install.sh:333 is a code comment outside this PR's scope.

Issue housekeeping

After this PR merges, the following issues get closed with explanatory comments naming which PR did what:

This PR body includes the GH-semantics closes #43 / closes #51 markers as a fallback; the manual close-with-comment is the preferred path (it adds the explanatory text).

CI / billing note

Hal0ai org Actions are billing-blocked — CI on this PR fails in ~2s with no logs. Since this is a docs-only PR, the broken CI is not a risk. User will admin-merge.

…d C — refs #54)

Wave 2, Child C of ADR-0001. Documentation pass for the auth collapse
shipped in PRs #58 (Child A — FastAPI password + session cookies +
dual cookie/Bearer middleware) and #59 (Child B — Caddyfile reduction
+ PUBLIC_PATHS deletion + --no-tls flag + HAL0_PUBLIC_HOST /
HAL0_HARNESS_TLS rename).

installer/README.md
-------------------
Rewrites the auth section to describe the single FastAPI auth layer.
Drops every reference to --auth=basic / HAL0_ADMIN_USER /
HAL0_ADMIN_PASSWORD / HAL0_HOSTNAME / Caddy basic_auth / htpasswd.
Documents the --no-tls flag (FastAPI binds 0.0.0.0:8080, reachable at
http://<host>:8080/). Renames HAL0_HOSTNAME to HAL0_PUBLIC_HOST in the
env-var table. Adds an "Upgrade notes (pre-v1)" subsection explaining
that existing --auth=basic installs lose edge auth on upgrade and the
two mitigations — set a password in the wizard, or --no-tls behind your
own reverse proxy. Calls out the wizard's password-setup step (POST
/api/auth/password, public on first run per Child A).

PLAN.md
-------
§1 "Auth + reverse proxy" rewritten to reflect the single FastAPI layer
and a "Trust posture" subsection: hal0 defaults to open on the LAN;
password auth is opt-in via the dashboard wizard; programmatic clients
use Bearer tokens unchanged from #29. Drops the Caddy basic_auth /
PUBLIC_PATHS prose; narrows Caddy's scope to TLS termination + reverse
proxy. §10 (harness flags) renames HAL0_HARNESS_AUTH → HAL0_HARNESS_TLS
to match what the harness scripts actually look for.

docs/api-errors.md
------------------
Adds a brief note in the 401 section linking to ADR-0001 / PR #58 and
naming the new endpoints (POST /api/auth/login, /api/auth/logout,
/api/auth/password). The envelope shapes themselves are unchanged.

tests/harness/FINDINGS.md
-------------------------
Prepends "FIXED BY ARCHITECTURE REMOVAL (ADR-0001)" notes to the three
historical entries that the auth collapse renders structurally
unrepeatable: §10 (Caddy basic_auth swallows PUBLIC_PATHS — the
original #28 critical bug, fixed in PR #49 and now historical because
Caddy no longer has matchers or basicauth per PR #59), §16 (basic_auth
password unrecoverable post-install — source of the #43 HITL decision,
fixed by deletion because credential capture moved into the wizard per
PRs #58 + #59), and §21 (/api/metrics/prometheus orphan in
PUBLIC_PATHS — fixed by deletion because PUBLIC_PATHS is gone). The
original report bodies are preserved verbatim below each note for
historical reference. Re-run instructions updated to the new
HAL0_HARNESS_TLS knob.

README.md, tests/harness/README.md
----------------------------------
Sync the auth-posture summary in the repo root README and the harness
opt-in flags table to match the new single-FastAPI model and the
HAL0_HARNESS_TLS rename. These weren't called out in the spec but were
left stale after Child B; updating them keeps the docs internally
consistent.

Closes #43 and #51 (per the parent ADR plan). Issue close comments
follow the merge via the gh CLI; this PR body is the GH-semantics
hook in case the manual close doesn't land.

closes #43
closes #51
refs #54
refs #57

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thinmintdev thinmintdev merged commit ae36a77 into main May 17, 2026
0 of 6 checks passed
thinmintdev added a commit that referenced this pull request May 21, 2026
ADR-0001 (Collapse edge auth into FastAPI) is implemented. Child A
(#58 — FastAPI password auth), Child B (#59 — Caddyfile reduction +
--no-tls), and Child C (#60 — docs pass) all landed. Flips the
header from Proposed → Accepted, records proposal/acceptance dates
separately, names the implementing PRs, and appends an Outcome
section summarizing what shipped against the original Decision.

Adds #28 (the critical basic_auth ordering bug) to the closed-on-land
list per tests/harness/FINDINGS.md §10. README.md and installer/README.md
were already brought into line with the v1 single-FastAPI-layer reality
in PR #60 — no further changes needed there.
@thinmintdev thinmintdev deleted the docs/adr-0001-c-housekeeping branch May 21, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant