Repository navigation
feat(console): AAE Assurance Console — four surfaces, no framework, still read-only - #6
Merged
Merged
Conversation
…till read-only Built on 3057808's security contract, which is treated as an invariant: one viewer token, no mutating route, no REMORA package in the image. All fifteen container tests kept and extended rather than replaced. ## The regression that started it Stripping REMORA out of the console image took `core-artifact-lock.json` with it, and the verified engine version, commit and release silently became empty — a console looking fine while telling you less than it should. The lock is 30 lines of JSON the console READS; copying it back reintroduces no dependency. A test now fails if any of the three is unreported. ## Architecture FastAPI serving typed JSON and three static files. No Node, no npm, no framework, no build step, no external request. console/ app.py fetch, validate, serve, report failure, set headers static/ index.html the shell and four surfaces aae.css one graphite theme, light and dark aae.js rendering, no dependencies `app.py` does five things and no more. Every response has an explicit Pydantic model; nothing returns a raw database row. ## Security headers Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; object-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none' X-Content-Type-Options: nosniff Referrer-Policy: no-referrer Cache-Control: no-store `form-action 'none'` means no markup here can post anywhere at all. `no-store` because a cached copy of governance state on a shared machine outlives the session entitled to see it. A test asserts no static file references an external host — it fails earlier and more legibly than a CSP violation, which surfaces as a silently missing asset. ## Four surfaces **Overview** answers whether enforcement is operational in one line, then lists only ACTUAL deviations. A list that always has entries is a list nobody reads, which is how a real finding gets missed. With the control plane stopped it names the outage, counts it, and still renders — a test stops the container to prove it. **Decisions** is a proposal LOOKUP, deliberately not a feed. The core returns a proposal by identifier and cannot list them, and the business event log carries no proposal id because the dispatcher passes none to the tool. Assembling a "recent decisions" list from what is available would mean showing a reconstruction as though it were the record. The contract that would fix it is written down in docs/limitations.md as an upstream requirement. **Business records** shows work orders and their change history in human-readable form. `{"from": "normal", "to": "high"}` renders as `normal → high`; the raw JSON lives in the evidence drawer. **System assurance** collects the technical evidence: verified engine and commit, release, tool policy protection, audit integrity, record count, console access, database credential. ## Language Plain language first, the engine's canonical value second and monospaced, so "Approval required" reads as English and VERIFY reads as a machine token. Neither replaces the other — the audit record is unchanged. Every status carries a glyph and a word, never colour alone; a console that encodes "failed" as red fails the people most likely to be reading it. A test asserts each of the four state kinds has a ::before glyph. `/` focuses the lookup, Escape closes the drawer and restores focus, polling pauses while the tab is hidden, and "last checked" is always visible. ## Hardening the client The security hook flagged innerHTML. Audited every interpolation: all pass through `esc()`, so there was no live XSS path — but two spots were fragile. `state()` interpolated its `kind` into a class attribute, where escaping does not protect; it is constrained to four known values now. `esc()` also covers single quotes. ## What is NOT done No screenshot or visual-regression job. That needs a headless browser in CI, and the trade-off is worth a decision rather than an assumption: layout and contrast are currently reviewed by eye. Recorded in docs/limitations.md. 220 tests pass (71 contract, 149 end-to-end), 6/6 scenarios.
A public repository about governing agent actions needs a stated place to send findings, and a stated scope. The scope section is the part worth writing carefully. In scope is bypassing any control docs/security-model.md says is ENFORCED — and that document already separates enforced from merely declared, so the two documents agree by construction rather than by maintenance. Out of scope is the pinned core itself, which has its own repository, and anything already in docs/limitations.md — though a demonstration that a listed gap is worse than described is very much a finding. It also states plainly that there are no credentials in this repository, and that a committed credential would itself be a finding. Verified before publishing: `.env` has never been committed, and a scan of every commit for key-shaped strings returns nothing but the generator and test fixtures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Built on the security contract from
3057808, treated as an invariant: oneviewertoken, no mutating route, no REMORA package in the image. All fifteencontainer tests kept and extended, never replaced.
The regression this started from
Stripping REMORA out of the console image took
core-artifact-lock.jsonwithit, and the verified engine version, commit and release silently became empty —
a console looking fine while telling you less than it should. The lock is 30
lines of JSON the console reads; copying it back reintroduces no dependency.
Architecture
FastAPI serving typed JSON plus three static files. No Node, no npm, no
framework, no build step, no external request.
Every response has an explicit Pydantic model. Nothing returns a raw database
row, and nothing returns exception text — the browser gets a sentence and a
correlation id, the detail goes to the log.
Four surfaces
Overview answers whether enforcement is operational in one line, then lists
only actual deviations. A list that always has entries is a list nobody
reads. With the control plane stopped it names the outage and still renders — a
test stops the container to prove it.
Decisions is a proposal lookup, deliberately not a feed. The core
returns a proposal by identifier and cannot list them; the business event log
carries no proposal id because the dispatcher passes none to the tool.
Assembling a "recent decisions" list would mean showing a reconstruction as
though it were the record. The contract that fixes it is written down as an
upstream requirement in
docs/limitations.md.Business records renders change history in human-readable form —
{"from":"normal","to":"high"}becomesnormal → high; raw JSON lives in theevidence drawer.
System assurance collects the technical evidence in one place.
Language and accessibility
Plain language first, the engine's canonical value second and monospaced:
"Approval required" reads as English,
VERIFYreads as a machine token, andthe audit record is unchanged.
Every status carries a glyph and a word, never colour alone — a console that
encodes "failed" as red fails the people most likely to be reading it. A test
asserts each state kind has a glyph.
/focuses the lookup,Esccloses thedrawer and restores focus, polling pauses while the tab is hidden.
Security
form-action 'none'means no markup here can post anywhere.no-storebecausea cached copy of governance state on a shared machine outlives the session
entitled to see it.
The security hook flagged
innerHTML. Every interpolation passes throughesc(), so there was no live XSS path — butstate()interpolated itskindinto a class attribute, where escaping does not protect. Constrained to four
known values, and
esc()now covers single quotes.Not done
No screenshot or visual-regression job: that needs a headless browser in CI,
and the trade-off deserves a decision rather than an assumption. Layout and
contrast are currently reviewed by eye. Recorded in
docs/limitations.md.Verification
220 tests (71 contract, 149 end-to-end), 6/6 scenarios. The console tests run
against the live container: headers, self-hosted assets, typed payloads, the
proposal lookup chain, a 404 that leaks nothing, every mutating verb refused,
and a stopped control plane surfacing as a stated outage rather than an empty
panel.