Nothing configures Python logging and gunicorn only configures its own loggers,
so INFO lines from wpsuite.* were dropped: with the production launch command a
healthy start printed no Okta lines, and an operator could not tell the sync was
off from on-and-quiet. okta_sync's logger now has its own stderr handler, only
when the root logger has none. Verified with real gunicorn, 2 workers, with and
without a token. Other modules' output is unchanged.
New DEPLOYMENT.md section: how to see what the sync did, how to re-enable a
person (fix Okta first, then Enable in the User Directory), who may do it
(admin; super user only for exclusive-scope accounts), the host CLI when no
admin can sign in, and how to turn the sync off if it disabled the wrong people.
T13.1 shipped with its done-when list unchecked and no test of its own. Adds
tests/session_idle_check.py (28 checks): continuous activity survives 30 minutes
but not the ceiling, an idle session gets 401, the cookie is not rewritten per
request, a pre-D18 token still gets a ceiling via iat, identity carries forward,
both variables are documented. Mutation-tested (no throttle, no ceiling, a fresh
ceiling for legacy tokens each fail it).
Notes in wave-13.md: /api/auth/* is exempt from the refresh, and the wave exit
criteria say AUTH_SESSION_HOURS 2 while T13.1 and the code say 8.
No UI change. The existing Activity log card already renders a sync disable
legibly: system:okta_sync / user deprovisioned by sync / user / <name> /
okta_status: SUSPENDED|MISSING. tests/okta_sync_ui_check.py runs the real sync
on a throwaway database and reads the real page at 1440px and 390px (28/28):
rows, search, filter, no sideways scroll, no JS errors, and the disabled
account refused on its next request. Does not depend on CR-019's usage card.
A daemon timer thread starts from a new lifespan hook in app.py and calls the
T13.3 sync every OKTA_SYNC_INTERVAL_SECONDS (default 900, minimum 300). With no
OKTA_API_TOKEN it starts nothing and the startup log says so.
The api runs 2 gunicorn workers, so each starts its own timer. A single atomic
conditional UPDATE on one app_settings row (key okta_sync) is the gate: exactly
one worker wins each cycle, on SQLite and Postgres, with no lock held. The row
survives a restart, so a restart inside the interval starts no second run. A
fetch is now capped at 120 s in total, so a run is always shorter than the
minimum interval and cannot overlap the next. No migration needed.
docker-compose.yml passes OKTA_API_TOKEN, OKTA_ORG_URL,
OKTA_SYNC_PROFILE_ATTRIBUTE and OKTA_SYNC_INTERVAL_SECONDS to the api service.
tests/okta_sync_schedule_check.py: 38 checks including an 8-worker race on a
file database (exactly one winner, 16 rounds) and fail-closed through the
scheduled path. okta_auth_check.py still 22/22.
run_sync() compares the Okta user list (T13.2) to active local accounts and
disables the ones Okta no longer vouches for. One AuditLog row per change,
actor system:okta_sync, action user_deprovisioned_by_sync.
Fail closed: any exception from the fetch, an empty or untrusted answer, or a
failed save changes nothing and writes nothing. The fetch runs before the
database is read, so a failed fetch has no path to a change. It only ever
disables; an already-disabled account is untouched and gets no new row.
Decided with Matt 2026-10-16: disable on missing, SUSPENDED or DEPROVISIONED.
PASSWORD_EXPIRED, LOCKED_OUT and RECOVERY do not disable (the job never
re-enables, so a literal "not ACTIVE" would lock people out for good).
Added a guard: no match between any active local account and any Okta user is
refused as a wrong identity attribute, not read as a mass offboarding.
tests/okta_sync_job_check.py: 71 checks; removing the fail-closed branch and the
guard fails 28 of them. BL-069 logs the missing per-run cap.
New server/okta_sync.py: lists every Okta user and status with its own
read-only credential (OKTA_API_TOKEN, SSWS), separate from the OIDC client.
Follows pagination. Every failure raises OktaSyncError; an error is never an
empty list, because T13.3 reads an empty list as "nobody is active".
Also refuses: a next-page link to another host (token never leaves the org),
a redirect, a chain over 50 pages (a cut-off list looks like missing users),
a bad item among good ones (never skipped), and an empty list.
tests/okta_sync_check.py: 52 checks, self-contained (httpx MockTransport).
Not wired into app.py yet. T13.3 uses it; T13.4 starts it on a schedule.
Matt reran tests/browser_check.py on the re-pointed probe: all
passed. Every T12 done-when and every wave 12 exit criterion is now
checked in wave-12.md.
Wave 16 rebuilt on main (feat/wave-16-on-main, 2026-10-06) so it can
ship without wave 11 and T13.1. main has no sliding refresh, so the one
D18 check now runs only when auth.maybe_refresh_token exists; on main
it instead proves a valid token near its expiry is still accepted.
security_check 36/36 on this branch; smoke 27/27.
files_check.py 36/36 (T16.2), sample_check.py 10/10 and
critical_reopen_check.py 11/11 (T16.3), run on Matt's machine with
Edge 154. T16.2 and T16.3 done; wave 16 verification complete.
tests/cdp.py: every probe first failed 'exited rc=0 without binding
the port'. The shell was elevated; Edge and Chrome de-elevate by
relaunching through Explorer and the relaunch drops the debugging
port ('Edge is running elevated: 1' in the browser log). Adds
--do-not-de-elevate on Windows and a 15 s grace for the port after an
rc=0 exit. Both inert on a normal shell and off Windows.
(cherry picked from commit f752ae3677)
security_check.py 36/36 (da1325c: 20/36, the 16 failures are the
findings). sec_probe.py: only S3 and S12 change. equivalence_check
IDENTICAL vs da1325c (canonical SOP id in the scenario). Smoke test
27/27. pip-audit clean.
Open: files_check.py (T16.2), sample_check.py and
critical_reopen_check.py (T16.3) need a machine with Edge; those two
tasks stay not-done until they pass.
(cherry picked from commit f0750212ca)
- A SOP posted with no id lands on sop__<project_id>, the id pushSOP
has always used. Creating (or moving in) a SOP under any other id on
a project is refused with 400.
- While a project has a complete SOP, writing another complete one
needs Project Admin (the existing rule only checked the posted row).
- New project_baseline_sop(): canonical row when complete, else the
latest complete (pre-D20 rows). Used by /api/sops/latest with
complete=true&project_id, project_summary, project_sop_team and
project_qa_group, so a rogue row made before the fix cannot stay
the baseline or the mail routing.
- Existing rows under other ids stay and keep their old rules.
Security review SEC-02 (a project_user took over the baseline and the
PM/CM/QA mail routing with one POST).
security_check.py: 36/36 with D19-D21. Against da1325c: 7 D20 checks
fail (the findings). Smoke test 27/27; seed_demo writes the canonical
id.
(cherry picked from commit 7bd5ab104d)
New server/files_http.py; get_wp_file uses it.
- PDF and raster images (png, jpeg, gif, webp, bmp, avif) open inline,
as before; Cache-Control unchanged for the offline drawing cache.
- Every other type, SVG included, downloads as an attachment with
Content-Security-Policy: sandbox; default-src 'none'.
- SVG uploads stay accepted (decided 2026-10-02: accept, download only).
- Content-Disposition: ASCII fallback + RFC 5987 filename*, control
characters and quotes replaced. nosniff from the API too.
Security review SEC-01 (stored XSS through an SVG drawing) and SEC-15e
(non-Latin-1 names gave 500; CR/LF reached the header).
security_check.py D19: 20/20 total with D21. Against da1325c: 6 fails
(the findings); every inline/cache/access check passes on both.
(cherry picked from commit 14ecb75c88)
decode_token treats any decode failure, and any cookie over 4096 chars,
as not signed in, and requires exp and sub. PyJWT 2.13.0 -> 2.15.1
(pip-audit: 13 advisories -> none).
Security review SEC-07: a crafted 1.6 KB cookie with no account gave
500 + stack trace; now 401.
New tests/security_check.py (no browser): D21 section 6/6. Against
da1325c with PyJWT 2.13.0 it fails 3 checks (crafted cookie 500,
token with no exp accepted, old pin) - the findings. The over-long
cookie and the two still-works checks pass on both.
Smoke test 27/27.
(cherry picked from commit 01ce7e941c)
D19 - uploaded files download safely (SEC-01, SEC-15e)
D20 - one SOP per project (SEC-02)
D21 - session decode fails closed, PyJWT 2.15.1 (SEC-07)
From the security review of 2026-10-01. Decision record and task
breakdown only in this commit - no code yet.
(cherry picked from commit 1c221a122e)
Matt's run (Edge/Chrome, one at a time): bulk_users_ui_check 19/19,
console_dialogs_check 16/16, mobile_check 24/24, a11y_check 22/22.
browser_check 67/71: its four failures asserted column POSITIONS
(9 columns; r.cells[3]/[4] for Permissions/Project role). CR-020's
selection column comes first, so those read Username and Email. The
probe now expects 10 columns with the selection column first, finds
the cells by header name, and checks your own row has no selection
box. Verified on the real page in the DOM harness; rerun to close.
After-screenshots committed in docs/reference/baseline/wave-12/.
BL-061 logged: the pre-existing sync badge covers a control for ~2 s
after load (pointer-events:none, so never blocks a click); belongs
with wave 14's badge work.
- tests/bulk_users_ui_check.py (new): selection, keyboard Space on a
row box, toolbar role change, super-user CSV with good and bad lines,
add-to-project with a role, typed DELETE, all end to end against a
real server; 390px bar layout; writes after-screenshots to
docs/reference/baseline/wave-12/. Needs a browser: to be run on
Matt's machine.
- tests/cdp.py: --do-not-de-elevate and the rc=0 grace, the same
change as wave 16 T16.4 (identical content, merges cleanly), so the
probes start from an elevated shell on this branch too.
- Verification record in wave-12.md: bulk_users_check 61/61 (main
7/18), single-user routes identical before/after on 16 calls, DOM
harness 48/48, jsdom against a real server 13/13, smoke 27/27,
seed_demo OK. Server-checkable done-when boxes ticked; the browser,
screenshot and full-suite boxes stay open until run on Edge.
- BL-060 logged: a super user's refusal reason promises a project
access change neither the dialog nor the bulk route allows. Needs
Nick; not fixed here (scope).
- file-map.md: wave 12's two new checks.
'Delete selected…' in the bulk bar. The dialog lists every affected
username (scrolling inside the dialog for a long list), says the
delete cannot be undone and offers disable instead, and sends nothing
until the word DELETE is typed in capitals, whatever the count
(confirmed 2026-10-06). Wrong words keep the dialog open with the
reason; cancel sends nothing.
Your own account cannot be selected; if it ever reached the request,
the server refuses that row and the report names it with the reason.
The bulk delete is a prompt-style dialog, so it is covered in
tests/console_dialogs_check.py (its docstring asks for exactly this):
new section 4 drives it in the browser with native dialogs poisoned.
DOM harness: 48/48.
POST /api/auth/bulk-users/resolve reads a list of usernames (first
column; comma, semicolon or tab; header skipped) and answers line by
line, the CR-005 validate-and-report pattern. A line is rejected, with
its number and reason, when it names nobody the caller can see ('User
not found', as everywhere else), an account they may not change (the
single route's own reason), their own account, or a username already
listed (duplicate of line N). An email address resolves only when
exactly one account has it. Nothing is changed by this route.
The console's 'Select from CSV' turns the accepted accounts into the
ordinary selection (filter reset so every selected row is visible) and
lists every rejected line. The action, confirm and per-row report are
the checkbox ones, through the same T12.1 routes, which re-check each
row: a CSV cannot reach an account a checkbox could not.
Usernames only, action in the toolbar (decided 2026-10-06). Files over
1 MB are refused before upload; FileReader fallback for browsers
without Blob.text().
bulk_users_check.py: 61/61. DOM harness: 40/40.
Role change, enable/disable, and project add/remove on the selected
rows, wired to the T12.1 endpoints. Delete is T12.5.
- The toolbar offers only what the caller may do: grantable roles,
managed projects (archived last, marked), grantable per-project roles.
- Every action confirms through wpConfirmDialog naming the exact count
(and for projects, the project and role) before anything is sent.
- The result lists every failed row with the server's reason, plus the
changed / already-set counts; a partial failure is a warning, an
all-failed batch an alert, a server error says nothing was changed.
Never a blanket success. Announced through the live-region banner.
- The directory reloads afterwards, which clears the selection.
DOM harness (jsdom, real page and scripts, mocked API): 30/30 with
T12.2.
- A checkbox per row the caller may change; select-all covers only the
rows the current filter and search show, and is indeterminate on a
partial selection.
- Your own row and rows you cannot change show a disabled box whose
label gives the reason.
- Changing the filter or the search clears the selection and says so
in a live region (decided 2026-10-06), so no hidden row stays
selected.
- The bulk bar appears at one or more selected rows and is hidden (out
of the tab order) at zero. Actions arrive in T12.3.
- Selection is updated in place, not by re-rendering, so focus stays on
the checkbox just used. One delegated listener; no ids in inline
handlers.
- The email-width rule now targets td.ell, not nth-child(3), which the
new column would have shifted.
Checked in a DOM harness (jsdom) against the real page and scripts:
14/14; against main the selection checks fail. Browser probe at
390px/1440px follows in T12.6.
POST /api/auth/bulk-users/{active,role,projects,delete} take a list of
user ids (max 500) and run each row through the same guards and audit
as the single-user route: the rules now live once, in guard_target and
apply_user_{active,role,delete,projects}, which the single-user routes
call too.
- A refused row is reported with its reason; the rest still run; the
response counts ok / unchanged / failed. Never a blanket success.
- The caller's own account is refused only on its own row.
- One AuditLog row per changed account, same action and shape as the
single route. A row already in the requested state is 'unchanged'
and writes no audit row.
- Project assignment is add/remove to ONE project with a per-project
role (confirmed 2026-10-06); roles on the user's other projects are
carried over as stored.
- Routes sit under /api/auth/bulk-users/ because /api/auth/users/bulk/
would match {user_id}='bulk'.
New tests/bulk_users_check.py (no browser): 47/47. Against main: the
7 single-route checks pass, every bulk check fails.
Single-user routes compared before/after on 16 calls (200/400/403/404):
identical responses, audit rows and memberships. Smoke test 27/27.
Brings docs/waves/wave-12.md and decisions-2026-09-17.md across from
feat/waves-11-13 (planning docs only, no wave 11 or 13 code), so the
PR into main is wave 12 alone.
Confirmed 2026-10-06 by Matt Mabrey: typed DELETE for bulk delete;
project assignment is add/remove per project; changing the filter
clears the selection; the CSV holds usernames only.
Found running the full tests/*_check.py suite as part of a deployability
check on feat/waves-11-13: autosave_check.py's "section 7" asserted that
calling trackStepDwell() still wrote an event into wp-usage.js's
localStorage log (wp_suite_analytics_v1). That assertion predates CR-019
and was checking that the autosave guard hadn't accidentally clobbered
the pre-existing analytics dwell listener - a real concern at the time.
T11.6 (previous commit b2a083a) retired that listener on purpose: track()
is now a documented no-op and wp-usage.js is gone, so the localStorage key
is never written to any more. The test was still asserting the old
behavior, so it now correctly failed (0 -> 0) - this was a gap in T11.6's
own verification (only tests/baseline_shots.py was run for it at the
time; the full suite wasn't).
Fix: rewrote section 7 to check what's actually still true - autosave's
own registration (WPAutosave / sopDraftId), and that the retired
trackStepDwell() is a harmless no-op (exists, doesn't throw) rather than
missing or broken - instead of asserting it still records anywhere.
Verified: tests/autosave_check.py now passes 33/33 (was 33/34, exit 1).
Also ran the complete tests/*_check.py suite (39 scripts) as a
deployability check for the whole feat/waves-11-13 branch:
- 38/39 exit 0 after this fix
- token_check.py exits 2 when run with no arguments by design (it needs
--out or --compare) - a harness-invocation detail, not a test failure;
already confirmed non-regression in wave 10
- generalinfo_check.py has one known pre-existing failure (a raw colour
literal check against html/wp-creation-styles.css, a file untouched by
any wave 11/13 work) - already diagnosed as pre-existing in wave 10,
unrelated to CR-019/D18
Also re-verified the usage_events migration (T11.1) round-trips cleanly
on SQLite (upgrade/downgrade/upgrade) and renders clean, valid DDL for
Postgres via `alembic upgrade ... --sql` (TIMESTAMP WITH TIME ZONE / JSON,
no SQLite-only syntax) - no BL-027-class defect.
Backend smoke test (27/27) and seed_demo.py still pass.
Removes the old "Usage logs" card from admin.html/admin.js (the
usage-admin panel + loadUsage(), D5/T7.10) now that T11.5's real,
server-side Activity & usage card exists and reads real per-user data
instead of per-browser localStorage.
wp-usage.js is deleted outright, along with its three <script> includes
(admin.html, wp-creation-index.html, work-package-suite.html) - it had
no reader left once the panel above it was removed (the "download the
full event log" button lived only in that panel), and per the original
CR-019 decision record it was never reliably tied to a real identity,
so it was never a candidate data source for the new report either.
Its two call sites (wp-creation-app.js, work-package-suite-app.js) keep
a local track() function as a documented no-op rather than having each
of their ~45 individual track('event', ...) call sites deleted one at a
time - that would be a much larger, riskier diff for the same outcome
(no data is recorded either way), and each call site still marks what
was worth recording if usage analytics are ever rebuilt server-side.
work-package-suite-app.js's dwell-timer plumbing (_stepEnter /
trackStepDwell), which only ever fed track(), was left in place for the
same reason: inert, not broken.
Also removes tests/usage_check.py, which tested exactly the retired
feature, and updates its line in docs/reference/file-map.md to point at
the 2026-09-17 decision record instead.
Verified:
- grep across the whole repo for WPUsage / wp-usage.js / usage-admin /
usage_check: no live references remain, only explanatory comments
and planning docs (decisions-2026-09-17.md, wave-11.md) that
describe the removal itself
- node --check on all three touched .js files: no syntax errors
- full backend smoke test (27/27) and seed_demo.py still pass
- tests/baseline_shots.py --pages admin,creator,sop at 390px/1440px,
run locally: all three pages render with no new JS errors (the one
"beforeunload" log line on sop/creator at 1440px is pre-existing
harness noise from wp-autosave.js's unsaved-work guard, unrelated
to this change) and no horizontal overflow; refreshed baseline
screenshots committed alongside this change
New card in admin.html/admin.js, above the old per-browser Usage logs
card (which T11.6 retires next). Filters (date range, project, user,
tool) drive GET /api/usage/summary; two export buttons call
GET /api/usage/export (raw / sanitized) and save the CSV via a Blob,
same download pattern wp-usage.js already uses.
Access: the card lives inside admin.html, already gated admin-only
client-side by gateByRole() (unchanged) - a non-admin never sees the
card. The underlying API is gated server-side by require_user_manager
regardless (admin or project_super_user on >=1 project), independent
of and stricter than the client-side gate, so a non-admin request is
refused even if someone reached the endpoint directly.
Accessibility (C1): every control is a real <input>/<select>/<button>,
keyboard-operable. Status/export banners use the existing '.banner' /
'*-banner' id convention, which console-util.js's MutationObserver
already turns into aria-live (role=status, or role=alert on a '.bad'
banner) - no new announcement plumbing needed. No new CSS: reuses
.toolbar/.banner/.card/.row/.kv/.users, so nothing here adds a second
token source (the token rule).
Verified so far:
- node --check html/admin.js: no syntax errors
- every id admin.js's new code references exists in admin.html
(scripted diff against the full getElementById/id= sets)
- live-server check: GET /api/usage/summary with the exact
(possibly-empty) query string _activityFilters() builds returns
the {active_users, per_user_last_active, by_tool, event_count}
shape renderActivity() expects; project_id filter narrows
correctly; GET /api/usage/export?sanitize=true returns
text/csv with the expected header row
- full smoke test + seed_demo.py still pass
NOT yet verified: rendering at 390px/1440px with before/after
screenshots (CLAUDE.md verification step). This sandbox has no
headless-capable browser (no chromium/msedge on PATH) and the
playwright/chromium download is blocked by this environment's
network allowlist, so tests/cdp.py's harness can't run here. Deferred
to T11.7, same as wave 10's browser checks — flagging rather than
skipping silently.
CR-019 / wave 11. Adds GET /api/usage/export, reusing _usage_query()'s
scoped filters (from/to/project_id/username/tool) and the same
require_user_manager gate as /api/usage/summary. Two modes:
- raw (default): real usernames, for internal admin use.
- sanitize=true: usernames replaced with an HMAC-SHA256 pseudonym
(keyed with auth.SECRET_KEY, 16 hex chars, 'u_' prefix) so the file
can be fed into PowerBI or another external reporting tool without
carrying real identities. HMAC chosen over a plain hash since the
username space is small enough to brute-force a bare digest.
Both modes emit at, username, project_id, tool, event as columns and
deliberately omit the detail JSON column in both modes to avoid an
identity leak riding along inside free-form detail data. Response is
returned with a Content-Disposition: attachment header and a filename
that encodes mode + date.
Verified locally against a throwaway SQLite DB with two seeded users
and four seeded UsageEvent rows:
- raw export contains the real usernames and matches the summary
endpoint's event_count for the same session state
- sanitized export contains no real username or email anywhere in
the file body, across two independently-issued export calls
- the same real user maps to the same pseudonym both within one
export and across the two separate export calls
- raw and sanitized rows line up 1:1 on at/tool/event for the same
filter set
- the tool= filter narrows the export the same way it narrows the
summary
- a plain project_user is refused with 403; an unauthenticated
request is refused with 401
- full smoke test (27/27) and seed_demo.py both still pass
GET /api/usage/summary: active-user counts by day/week/month, per-user
last-active, per-tool breakdown. Filters (from/to/project_id/username/
tool) combine. Gated by require_user_manager - same boundary as the User
Directory. A project_super_user is scoped to events tied to projects
they manage plus their own activity (managed_project_ids), never another
user's suite-wide activity outside that; an app admin sees everything.
_usage_query() factored out so T11.4's export can never disagree with
what this endpoint counted - same filtered row set, not two derivations.
Verified: admin sees all seeded events; a project_super_user scoped to
one of two projects correctly sees only that project's events plus their
own account-wide activity, and specifically does NOT see the admin's
other-project or no-project activity; date/tool/project filters each
narrow results correctly and combine.
Sessions now slide on activity (AUTH_IDLE_MINUTES, default 30) capped by
a hard ceiling from original sign-in (AUTH_SESSION_HOURS, meaning changed,
default 12 -> proposed 8). login_at carried across reissues so the ceiling
survives refreshes; pre-D18 tokens with no login_at fall back to iat.
Refresh is throttled (~IDLE_MINUTES/3) so the cookie isn't rewritten on
every request. Wired into auth_gate (server/app.py) - no DB hit, reads
only the already-validated claims.
Verified: 7 unit-level checks (fresh-token expiry, past-ceiling refusal,
throttling, mid-session extension, legacy-token fallback both live and
expired, idle cutoff itself) all pass, plus the full 27-check smoke
suite still passes end to end through the new middleware path.
Matt asked whether idle time would be a better fit than a flat session
length. It is, but idle-alone weakens D18's own purpose - a continuously
active session would never force a fresh Okta recheck on its own. Decided:
both. AUTH_IDLE_MINUTES (new, default 30) slides the session on activity;
AUTH_SESSION_HOURS (existing var, meaning changes to an absolute ceiling,
default 12 -> proposed 8) caps it regardless of activity.
Docs only in this commit - implementation is T13.1, next.
POST /api/usage/ping writes one page_open UsageEvent per authenticated
page load, identity from the session (get_current_user), never from the
client. Wired from exactly one place - auth-guard.js's proceed(), after
wp-auth-ready - so this can't drift into six separate per-page copies.
okta_callback now also writes one login event per sign-in.
Verified locally: unauthenticated ping -> 401; a real fake-Okta sign-in
writes exactly one login row and one page_open row, no duplicates.
New usage_events table, separate from audit_log - see the model docstring
for why. Verified: applies and downgrades cleanly on SQLite, and the
postgresql-dialect --sql render has no risky defaults (the BL-027 class
of defect). No app wiring yet - that's T11.2.
CR-019 - usage/activity metrics (admin console), wave 11
CR-020 - bulk editing of users, wave 12
D18 - Okta/AD deprovisioning detection and auto-disable, wave 13
Raised by Matt Mabrey 2026-09-17. Decision record and task breakdowns
only in this commit - no feature code yet.
Confirmed by an actual live Okta sign-in after main (cc64c88) deployed: preferred_username is the right identity claim, and the redirect URI works. Matt matched his existing pre-Okta admin account rather than getting JIT-provisioned as a duplicate. Two deploy-time snags recorded, both Case B (config, not data): OKTA_CLIENT_ID/SECRET/ISSUER left empty in Portainer at first (caught cleanly by is_configured()), then OKTA_ISSUER missing its https:// scheme (surfaced as httpx.UnsupportedProtocol, not a deliberate app error - BL-028 still stands). Neither needed the backup. BTG pilot group now includes Cody and Cameron, awaiting Adrian.
cmd_promote() changed a user's role with no audit trail, unlike the
identical change from the web Admin Console (set_user_role() ->
log_event(), action "role_changed"). Not a new privilege - anyone
with container-exec access already has DB access directly, D16's own
trust-tier reasoning - but there was no record of who ran it or what
changed.
Now writes an AuditLog row matching set_user_role()'s shape, tagged
via:cli (mirrors JIT provisioning's via:okta_jit) since a container
shell exec carries no signed-in identity to attribute the change to.
Verified against a scratch SQLite db: audit row lands correctly, role
change persists, the no-such-user refusal still exits 1 clean.