Repository navigation
v2.4.0 — Copy class configuration between classes, time logic through one resolver, and hardened production checks
·
449 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Released 2026-10-29 at 03:07 UTC. Migrations c8f1a2b3d490, e3b7c1d9a2f4.
Highlights
- Class-scoped configuration file export/import with authenticated five-day files, atomic imports, and temporary retry receipts
- All time logic goes through the canonical temporal resolver, and a guard now actually checks it
Fixed
- Store purchases failed with "Incorrect passphrase"
Full details
- Store purchases failed with "Incorrect passphrase" for students whose browser had saved their PIN as the site password: the transfer page's PIN field was marked
autocomplete="current-password", so Chrome offered to save the PIN and then autofilled it into passphrase prompts. The field is nowautocomplete="off", like the dashboard PIN field (support ticket #13).
Security & Reliability
- All time logic goes through the canonical temporal resolver, and a guard now actually checks it
- The status collector reads nothing from the application during maintenance
- The sysadmin bug reward is retired until badges are formally implemented
- The production deploy workflows installed Tailscale 1.94.2
- The pre-release backup script left an SSH tunnel to the production database open indefinitely
- Logs and URLs no longer carry internal identities
/metricsanswered the internet, and the health checks could be polled without limit (#1661)
Full details
- All time logic goes through the canonical temporal resolver, and a guard now actually checks it (
SPEC-TIME-0011.3,INV-ARC-015§VII; owner rulings 2026-10-24). The time guardrail intests/dom/operation/test_time_money_guardrails.pyhad scannedtests/dom/app, a directory that does not exist, since it was moved on 2026-07-18, so it passed while checking nothing; the separatepolicy_guardrails.pyrule banned onlytimedelta, in three directories, with an allowlist. Together they let 464 prohibited time operations stand in 72 application files: direct clock reads,utc_now()/ensure_utc()helpers outside the resolver,astimezone/pytzconversions,timedeltadate arithmetic and UTC.date()derivations. Every one now goes through a resolver primitive. The resolver gainsshift_calendar_days(calendar-day shifts that keep local midnight or the local clock across DST),localize_timestamp(an instant in the class timezone) andsame_instant;elapsed_durationnow sums intervals exactly and truncates once instead of per interval;ensure_utcandadvance_local_calendar_daysare gone, and private helpers that only forwarded to the resolver are inlined.tests/test_SPEC_TIME_001__resolver_is_the_only_time_tool.pyparses every file inapp/, fails if it scans fewer than 150, and proves each prohibited pattern with a mutation case, including the two shipped DST defects the retiredtimedeltarule recorded; that rule and its allowlist are removed. Corrected behaviour: "Transactions today" on the teacher dashboard counts the class's day, not the UTC day; recurring rent late fees count class-local calendar days (INV-ARC-015§VIII.1), not 24-hour blocks; custom N-month rent steps count from the anchor date instead of drifting (no production class uses them). Timestamps without a timezone are now rejected where they were silently read as UTC; nothing in the application writes one. Dead rent-period and waiver helpers that added fixed periods to UTC instants are deleted. Tests take time fromtests/helpers/temporal.py, thin wrappers over the resolver (SPEC-TEST-0011.1). Displayed times are built by page builders, not templates (INV-ARC-022§V.8,SPEC-UI-001§VI–§XI; owner rulings 2026-10-25, resolved by authority): thefmt_timestamp/fmt_date/fmt_compact_date/fmt_timeJinja filters and theformat_utc_isotemplate global are removed, along with everystrftime/isoformatand time comparison in templates and every time format in route bodies; each page's builder produces the text through the resolver and the template prints it. A guard (tests/test_INV_ARC_022__templates_do_not_format_time.py) holds templates and routes to this, with mutation cases. Display corrections found on the way: the rent page's waiver tab showed blank due and waived dates (nothing filled thelocal-timestampspans since an earlier rework) and now prints them in class time; the hall-pass verification kiosk showed UTC to an anonymous visitor and now uses the verified class's time zone; the insurance-claim transaction picker and the admin issue page's recent transactions showed UTC dates and now show class-local ones; the teacher recovery pages show their deadlines in UTC explicitly instead of whatever class session the browser held. - The status collector reads nothing from the application during maintenance (owner ruling 2026-10-23;
DOM-OPS-0012.14,SPEC-OPS-0061.6). It probes the Access gate first; while the gate is closed it stores only that gate check, makes no health read and stores no request telemetry, and records the endpoint and database as Unknown under the new diagnosticNOT_COLLECTED. The page already shows "Under maintenance" from the gate alone. The collector no longer sends the Cloudflare Access service token, which existed only to reach production during maintenance; the health endpoints are public, and the deploy no longer injects the token's secrets into the collector.SOP-DEP-0012.11 andSOP-DEP-0021.16 drop "public health probes require service-token headers". Found by the #1656 outside check. - The sysadmin bug reward is retired until badges are formally implemented (owner ruling 2026-10-27). Resolving an escalated ticket records the technical fix and returns it to the teacher; the form no longer offers a reward, and the resolve route ignores
eligible_for_rewardandreward_amountif a request still sends them, so a hand-built POST can no longer credit a student. Production has never issued one. DOM-SUP-001 v1.10 and SPEC-OPS-004 v1.5 record the change; theissues.eligible_for_rewardcolumn and thebug_rewardledger type are dropped by a follow-up contract migration. - The production deploy workflows installed Tailscale 1.94.2 (
release-v2.yml,login-notice.yml,tailscale-ssh-smoke-test.yml). Pinningtailscale/github-actionby SHA did not pin the client: v4.2.0 defaultsversionto 1.94.2, which predates Tailscale's 2026-10-21 bulletin TS-2026-013 (distrust of the compromised eMudhra certificate authorities, fixed in 1.104.2). The three workflows now pin the action at v4.3.0 (99a8333), whose default is 1.104.2; Dependabot's weeklygithub-actionsupdate keeps the client current with the SHA. The production host was upgraded from Tailscale 1.102.4 to 1.104.2 on 2026-10-24 (docs/ops/audits/HOST_UPGRADE_2026-10-24_TAILSCALE.md); the host package sits outsideunattended-upgrades, tracked in #1665. No exploitation was found and no credentials were rotated. - The pre-release backup script left an SSH tunnel to the production database open indefinitely (
infra/db-backup/prerelease.sh).backupstartedssh -f -N -L 55433:…and nothing closed it; the v2.2.4 tunnel was still listening six days later and made the v2.3.0 backup refuse to start. The tunnel is now owned through a control socket (~/cth-backup/tunnel.sock).backupkeeps it on success, becausecountsandrestoreneed it, and closes it on failure.countsandrestorereuse or reopen it.restore, the last step, closes it on exit alongside deleting the identity, which now falls back torm -fso a failedrm -Pcannot skip the close.close-tunnelhandles an abandoned run.tests/test_prerelease_tunnel.pyruns the real script against stubssh,dockerand tools in a throwaway HOME; 6 of its 7 tests fail on the previous script.SOP-DEP-0021.13 step 7 andinfra/db-backup/README.mddescribe the lifecycle. - Logs and URLs no longer carry internal identities (DOM-OPS-001 v2.15, owner ruling 2026-10-27). Every application log line named its class by the internal
class_id, and several messages printed internal seat and user ids (for exampleDASHBOARD DEBUG: Student 211,TAP success - seat 211,user_id=…). The line prefix now carriesclass_public_id; every log call that printed one now names seats byseats.public_idand classes byclass_public_id, or drops the id where the prefix already names the actor, and the authentication principal is omitted.FEAT-ENTRYandFEAT-COMMIT-OWNERSHIPprint idempotency keys and correlation ids as label plus fingerprint (loggable_token), since a composed key carries the ids it was built from; stored keys are unchanged./student/switch-class/and/admin/student/…/adjust-hall-pass-entitlementstake public ids, so nginx no longer logs the internal ones; the hall-pass adjustment now also resolves the seat within the teacher's active class only. Teacher-facing fallbacks that showedSeat 211read Unnamed student. Fresh support and identity-bind correlation ids no longer embed the class or user id. A structural guard (tests/test_DOM_OPS_001__logs_carry_no_internal_identity.py) rejects any log call reading an internal identity; it reports 103 on the previous tree. /metricsanswered the internet, and the health checks could be polled without limit (#1661). The/metricsguard allowed any request whoseremote_addrwas loopback, but nginx proxies every public request to gunicorn over loopback, so the guard never refused anything. It now uses the same host-local test as the Cloudflare-bypass check,ip_handler.is_host_local_request(): loopback and none of the proxy headers nginx always sets. The Prometheus scrape (127.0.0.1:8000, no proxy headers) is unaffected. The exposed payload carried no personal or tenant data (SPEC-OPS-003), only runtime and traffic statistics./healthand/health/statusare no longer exempt from rate limiting: each carries "30 per minute" per visitor in place of the daily defaults that the once-a-minute status collector exhausted on 2026-10-20, so the collector stays far inside it and no one can drive the database check without limit. Found by the #1656 outside check.
Accessibility
- Accessibility: configuration transfer forms have explicit labels and grouped selections; Copy Configuration navigation announces the current page
Full details
- Accessibility: configuration transfer forms have explicit labels and grouped selections; Copy Configuration navigation announces the current page. Rendered start, upload, and confirmation stages are covered by accessibility smoke assertions. The page has a contextual help panel, its alerts use the shared alert cards, every switch and checkbox has its own label, a feature's items are hidden and disabled while its switch is off, and the import review shows labeled tables instead of raw field names. Headings follow the page outline (h1, then h2 cards, h3 features, h4 items);
cards.top_cardandcards.nested_cardtake aheading_tag, defaulting to their previous h5/h6.
Internal Changes
- Class-scoped configuration file export/import with authenticated five-day files, atomic imports, and temporary retry receipts
- One tab icon across every Classroom Token Hub site
- The developer docs at classroomtokenhub.com/docs are now built with Hugo + Hextra instead of Docusaurus
- The Hugo + Hextra developer-doc proof builds on its own and matches the brand rules
- The backlog moves to GitHub Issues and the CTH Backlog project
- Release notes are grouped for readers instead of copying the CHANGELOG section
- The README stops keeping its own copy of release state
bug_rewardis no longer a lawful ledger transaction type- The Docusaurus workspace
docs-site/is retired - A support ticket's request trace could miss the requests that explained it
- The scheduled Full Test Suite's unsafe-markup guard now runs at all
Full details
- Class-scoped configuration file export/import with authenticated five-day files, atomic imports, and temporary retry receipts. Insurance tier groups now use canonical identities; migration preserves existing coverage through explicit successors. Requires the new
CONFIGURATION_EXPORT_KEYsecret (SOP-DEP-0012.12); without it the page loads but every export and import is refused. The import review shows each setting as its settings page does (pay rate per hour, times with units, class-local dates) instead of stored values. Teacher guide:docs/user-guides/features/teacher/settings/copy-configuration.md. - One tab icon across every Classroom Token Hub site. The icon is now the gold store symbol from the wordmark's middle row on Advisor Green (
static/images/icon-192.png,icon-512.png), replacing the text-and-dollar icon. The public site (classroomtokenhub.com) and the status page had no tab icon; they now carry byte-identical copies (github-pages/assets/icon-192.png,status_service/static/icon-192.png), since each publishes only its own directory.tests/test_favicon_mirrors.pyfails if a copy drifts from the source, with a mutation proof. The service worker cache moves toclassroom-token-hub-v13so installed apps pick up the new icon. A tab icon is browser chrome, not the on-page brand mark, soSPEC-DES-001§IX is unchanged. - The developer docs at classroomtokenhub.com/docs are now built with Hugo + Hextra instead of Docusaurus (
SOP-DOC-0003.6,SPEC-DES-0012.5)..github/workflows/github-pages.ymlrunsdocs-generator-proof/bootstrap.py,build.pyandcheck.pyand publishes the result; a failing check stops the deploy. Every Docusaurus page URL is preserved, and 2,891 of its 2,892 heading anchors (the one exception is a catalog anchor nothing links to). The engineering notes are no longer published. Publication now follows an allowlist inbuild.py, which fails closed, instead of Docusaurus's exclude list, which failed open;tests/test_docs_site_publishes_no_working_state.pyand the platform-split guards now read that allowlist. The bootstrap downloads and checksums Hugo for Linux as well as macOS, thenoindextag used during evaluation is removed, and the site's stylesheet is a gatedSPEC-DES-001§XIV surface. Heading-structure defects inside six canonical documents are reported as build warnings rather than blocking publication; they still need fixing at the source.docs-site/stays in the repository as a fallback until the Hugo site is confirmed live. - The Hugo + Hextra developer-doc proof builds on its own and matches the brand rules (
docs-generator-proof/; unpublished, the production docs site is unchanged). Hugo's build had been running the Zensical prototype's staging code from another worktree, so it could not be built from a fresh checkout;build.pynow owns theSOP-DOC-000§X publication allowlist and the catalog, andcheck.pyreplaces the Zensical comparison with fixed artifact rules (exact page set, links, anchors, assets, headings, search scope, canonical edit links). A design review againstSPEC-DES-001removed Hextra's own favicons and "Hextra" web manifest (the tab icon is now the application's), labels every catalog entry with the document's own title instead of filename-derived text such as "No pii leakage" or the retired "Advance bill cycle", and stops publishing the unauthorized engineering notes. Accessibility (INV-ARC-020§VII.D): nav links turned gold on hover over the green header at 4.34:1, below AA for that text size; hover now underlines instead. axe reports 0 violations across 11 sampled desktop and mobile states.COMPARISON.mdandevidence/remain as the record of why Hugo was selected. - The backlog moves to GitHub Issues and the CTH Backlog project.
docs/TRACKING/POST_LAUNCH_TRACKER_2026.mdcalled itself canonical but was last brought up to date for v2.1.1; later follow-ups lived only in release records. Its open items were re-verified againstmainand filed as #1635–#1659 (two folded into #1505 and #1507), and the file is archived todocs/archive/v2-tracking-2026/.SOP-DEP-0021.15: release-record follow-ups are filed as issues and linked.SPEC-ECON-0011.4 andSOP-DB-0011.8 cite their issues instead of the tracker (no rule changes);SOP-DOC-0013.38.DEVELOPMENT.md"Next" points at the project. - Release notes are grouped for readers instead of copying the CHANGELOG section (
scripts/release_notes.py,SOP-DEP-0021.14). v2.3.0's verbatim notes ran to about 20,000 characters, with single entries past 2,000 and fixes for students mixed with test and document changes. The notes are now Highlights, Fixed, Security & Reliability, Accessibility and Internal Changes. Each section lists one headline per entry with the PRs that entry cites as its own, and the full entries are collapsed beneath it. The deployment record and release run are linked at the end. Each CHANGELOG entry names its section in an invisible tag after its bullet (<!-- notes: … -->, optionallyhighlight), and the script refuses an untagged entry. v2.3.0's 22 entries are tagged.--rawprints the section verbatim.tests/test_release_notes.pyadds the section order, the headlines, PR attribution, the hidden tags and the refusals. - The README stops keeping its own copy of release state. It re-stated each release four times (the production line, a tag-by-tag sentence, a narrative of untagged releases, and a "Known limits" snapshot frozen at v2.0.1), so it went stale with every release. It now names the release in production once and points to the release records, the GitHub releases and the CHANGELOG; known limits live in the current release record.
bug_rewardis no longer a lawful ledger transaction type (DOM-LED-001 v2.18). Migratione3b7c1d9a2f4re-createsck_ledger_transaction_type_closed_vocabularywithout it, stillNOT VALID, and refuses to run while anybug_rewardrow exists; production has none. It also leaves the idempotent-type set and the insurance non-loss list. Downgrade re-admits it exactly.- The Docusaurus workspace
docs-site/is retired (SOP-DOC-0003.7,SPEC-DES-0012.6). The developer docs have been built with Hugo + Hextra since the cutover, so the Docusaurus config, its npmpackage.jsonand lockfile (the project's only Node dependencies), the React pages, sidebars and engineering-notes blog are deleted. The brand fonts and token layer the Hugo build still uses moved todocs-generator-proof/brand/, and the map of renamed developer-doc paths moved toapp/utils/docs_route_map.json, beside the helper that reads it. The Docusaurus design-linter surface andtests/test_docs_site_image_advisory_guard.py(which guarded a Docusaurus-onlyimage-sizeadvisory) are removed; the docs brand-conformance tests now check the Hugo site.requirements.txtis unchanged: it carried no Docusaurus dependency. - A support ticket's request trace could miss the requests that explained it. The dashboard polls
/api/student-statusevery 10 seconds, and the per-student trace keeps only the latest 20 requests, so a few minutes of idling replaced real requests with status checks before the ticket was filed. Successful status checks are no longer recorded (a failed one still is), and the sysadmin ticket page now shows each traced request's status code; on ticket #13 the trace held seven403purchase refusals that the page did not show. - The scheduled Full Test Suite's unsafe-markup guard now runs at all.
tests/test_no_unsafe_jinja_markup.pyrequiresJINJA_GUARD_BASE_SHAin CI, and every other gate derives it from a pull request's base SHA; the scheduledfull-suite.ymlrun has no pull request, so the guard errored on every scheduled run. It now passes the commit under test (${{ github.sha }}), so the scheduled run checksmainagainst its own committed baseline whileconstitutional-cikeeps checking pull requests against theirs. (The other two scheduled-suite failures, on the Copy Class Configuration page's help panel and alert markup, are fixed by #1676.)
Deployment record: DEPLOY_2026-10-29_3ce50ec.md · Release run: 40810333156
Dispatched before the maintenance window opened and before SOP-DEP-002 §VII.A steps 4-8 ran (backup, restore check, balance baseline) — see the Security entry under [2.4.1]. The record was written afterwards and names those checks as not run; the infra/release-gate work in [2.4.1] exists because of this gap.