Changes to Engage

Changelog

Read recent changes to Engage, from new features to fixes and improvements. The source repository holds the full development history.

18 November 2026

1 commit
  1. Docsproduct
    Define Engage as Fusion's home for participation
    c0e85d1 ↗

17 November 2026

14 commits
  1. Featuresense-box
    Publish priorities, discuss, link proposals and inline amendments (#150)

    Adds review-then-publish Sense Box priorities with public discussion and contributor status links; one priority can inform multiple proposals. Adds block-anchored inline amendments with fenced, recoverable application. Installs @ui-sdk/react and @ui-sdk/core.

    c44e0d5 ↗
  2. Featurecollaboration
    Public story and photograph contributions (#143) (#145)

    * feat(collaboration): model public story matters and guest intake Register a collaboration Matter type with no governance capability and no lifecycle stage, so a public invitation can never be deliberated, balloted, amended, ratified or published as policy. Add guest submission with a versioned consent scope, private media storage, metadata stripping for JPEG and PNG, reviewer-only permissions, and a durable rate limit plus Turnstile action for the public form. Refs #143 * feat(collaboration): publish the story invitation and contribution form Add /collaborate/ and /collaborate/<slug>/ where anyone can read the invitation and send story answers, photographs, or both without an account or party membership. The form asks for publication channels, credit, edit and AI-edit permission and an optional reply address before sending, keeps every answer when a submission fails, and never claims publication has happened. Refs #143 * feat(admin): add the story review queue and invitation editor Reviewers see each contribution with its answers, private photographs and consent summary, then record a decision, a note and where an approved item was used. Editors own the invitation wording, questions and open state without a deployment; question keys stay stable so earlier answers remain attached. Refs #143 * test(collaboration): cover guest intake, consent and private media Prove the guest path needs no account, consent cannot be widened from the client, private-only contributions cannot be approved, an anonymous name is never stored, concurrency cannot overwrite a decision, and image bytes stay private and metadata-free. Real-MongoDB cases cover unique references, version writes and the BSON media round trip. Refs #143 * docs(collaboration): record the matter model and launch obligations Describe the collaboration Matter, its consent and data handling, what editors can change without code, and the legal and image-policy gaps that must close before the invitation is promoted publicly. Refs #143 * docs(agents): require new features to be configurable by default Add a standing rule: editor-facing wording, questions and options belong in stored configuration, while permissions, consent vocabulary and security bounds stay in reviewed code. Refs #143 * chore(changelog): record public collaboration matters Refs #143 * fix(collaboration): make optional story answers explicit Refs #143 * chore(changelog): record the contribution form clarification Refs #143 * docs(collaboration): separate accounts, membership and contributing Refs #143 * chore(changelog): record the collaboration documentation note Refs #143 * feat(collaboration): delete material on withdrawal and by retention sweep Withdrawing a story now removes its text, name, reply address and photographs immediately, keeping only the review record and its date. Add a monthly sweep for declined material after 90 days, legacy withdrawals and approved reply addresses after 12 months. The sweep is dry-run by default and records what it would clear. Tell contributors the photo and third-party rules at intake, and warn reviewers that withdrawal is irreversible for the material. Refs #143 * test(collaboration): cover withdrawal clearing and retention windows Refs #143 * docs(collaboration): add pre-launch safeguards and privacy text Write the operating rules for photographer credit, other identifiable people, minors, AI-assisted edits, publishing and mistaken publication, and mark what still needs an owner decision. Extend the privacy policy (version 1.3) for the contribution purpose, its reviewer access and its retention schedule, while it remains owner-authorised with legal review outstanding. Refs #143 * fix(db): allow a local MongoDB selection timeout override A slow local Docker MongoDB took longer than 400 ms to answer its first selection, so development silently fell back to the in-memory preview and pages looked empty. The override applies locally; production keeps its 3 s default. Refs #143 * chore(changelog): record contribution withdrawal, retention and safeguards Refs #143 * chore(changelog): refresh after merging main * feat(collaboration): manage multiple invitations and typed profiles Replace the single seeded invitation with an authorised invitation directory: create as a draft, open, pause, close, archive and restore, with contribution counts per invitation. Archiving and drafting have no public page. Each invitation is created with one reviewed contribution profile. A written responses invitation never asks for photographs, a name or edit permission, and the server rejects photos sent to it, so a consultation does not inherit the storytelling form. Refs #143 * fix(collaboration): keep review history and finish the guest journey - Load existing notes and the contributor message, and only overwrite them when edited, so a status change cannot erase the record of a photographer's permission. Write the decision and its audit event in one transaction. - Make withdrawal and retention clearing terminal for the material, and offer 'Accepted as consultation input' as a separate outcome from publication. - Snapshot the invitation title, purpose and question labels with each contribution, and refuse an answer to a removed question rather than dropping it silently. - Allow several placements in the same channel and show the recorded history. - Keep the Save action available when 'withdrawn' is chosen, require a declared upload size, add photo previews, and allow blob: only for local previews. - Give contributors a reference, explain what 'no name' means for a photo, and require a reply address before AI-assisted edits. Offer an optional account next step after contributing. Refs #143 * test(collaboration): cover the reviewed journeys and remove a flaky event read Cover invitation lifecycle, profile isolation, notes preservation, terminal states, accepted private input, question snapshots, stale answers, repeated placements and reference search. Select the settings event by content rather than position, because several can share a millisecond. Refs #143 * docs(collaboration): record invitation management, profiles and journey evidence Refs #143 * chore(changelog): record collaboration invitations, profiles and fixes Refs #143 * feat(collaboration): publish an approved story gallery Show an approved story on /collaborate/<slug>/stories/ only while it is approved, the contributor allowed website use, it is a story-profile contribution, its material is intact and a reviewer has not hidden it. Credit follows the contributor's choice and no name is stored for an anonymous story. Photographs are served from a public route that re-checks publication on every request, so hiding or withdrawing removes access immediately. Reviewers can hide a story from the gallery, or restore it, without changing its approval. The action is versioned and audited. In-memory array filters now honour $in, which the gallery query needs and the preview previously ignored. Refs #143 * test(collaboration): cover gallery consent, hiding and withdrawal Refs #143 * docs(collaboration): document the approved gallery and its limits Refs #143 * chore(changelog): record the approved story gallery Refs #143 * chore(changelog): refresh after merging main * feat(collaboration): publish explicitly and measure interest Separate approval from publication: an approved story appears in the gallery only after a reviewer presses Publish, and hiding or showing it later keeps the first publication date. Approval alone never makes material public. Adopt the adult-only pilot rule with a simple 18+ attestation, no date of birth, and no publication of identifiable children. Record the approved removal commitments in the safeguards. Add aggregate interest counts for arrivals, first interaction, accepted contributions and the optional account step. A row holds only invitation, UTC day, stage, count and expiry. There is no cookie, session, address, identifier or typed content; the public endpoint is rate limited and the rows expire. Refs #143 * docs(collaboration): record publication, minors, removal and funnel rules Correct the gallery claims about a missing public image route and about what withdrawal can erase. Add dated screenshots of the gallery states, the explicit publication control and the interest panel so the review can see them. Refs #143 * chore(changelog): record explicit gallery publication and interest counts Refs #143 * feat(collaboration): let contributors correct or withdraw with a private link Each contribution receives a management token derived from its request reference and a deployment secret, so a retry returns the same link. Only a hash is stored and the raw token lives in the URL fragment, never in a request URL, log or referrer. The link shows the contribution and status, allows a correction that returns it to review and off the gallery, removes a published story from the gallery, or withdraws everything at once. The action is audited as the contributor's and the link stops working afterwards. Retention corrections from review: reply-address expiry runs from a stable approval date, and each sweep clear is conditional on the record still being in the expected state, with the media delete in the same transaction. The show action now requires a prior publication. Interest ratios say they are event ratios, not visitor rates. Refs #143 * docs(collaboration): record the management link, retention dates and pilot owners Fix the outdated guardian exception, point the empty gallery at the separate publication step, add management screenshots, and add an operations page that names the four unassigned responsibilities: inbox owner, backup, escalation and retention sweep operator. Refs #143 * chore(changelog): record contributor management and retention corrections Refs #143 * chore(changelog): refresh after merging main * feat(collaboration): optionally link a contribution to a signed-in account A member who holds a contribution's private link can link it to their Engage account after ticking explicit consent. The record stores the member identifier, time and consent version, and an audit event marks both linking and unlinking. Claiming is optional, changes neither publication nor approval, creates no permission, and leaves the private link as the only way to correct or withdraw the contribution. A second account is refused. Refs #143 * docs(collaboration): describe optional account linking and its limits Record that linked contributions do not yet appear on the member profile, bump the privacy policy to 1.6, and add a screenshot of a linked contribution. Refs #143 * chore(changelog): record optional contribution account linking Refs #143 * feat(collaboration): add an authenticated Horizon story feed GET /api/v1/horizon/stories serves published stories to Horizon with a bearer credential. It fails closed when unconfigured and rejects a missing or wrong token. Scope matches the public gallery: approved, explicitly published, website consent, story profile, material intact, not hidden. Consultation responses never appear. The payload carries answers, chosen credit, caption, media URLs with alt text, channels and consent flags, and excludes reply addresses, notes, member ids and tokens. Supports since/nextSince incremental polling and If-None-Match 304. Refs #143 * docs(collaboration): document the Horizon feed and its credential Refs #143 * chore(changelog): record the Horizon story feed Refs #143 * feat(profile): show linked published stories on the member profile A member who linked a contribution sees it in a Published stories section only while it is public in the gallery. The entry carries the initiative title, an excerpt of the first answer, the publication date, the photo count and a link to the story's gallery anchor. Unpublished, unapproved, hidden, withdrawn, cleared or consultation-linked material never appears, and the profile exposes no email, notes or management token. Hiding or withdrawing removes it from the profile at the same time. Refs #143 * docs(collaboration): note profile display and add profile evidence Refs #143 * chore(changelog): record linked stories on the member profile Refs #143 * test(horizon): add a simulated consumer and contract smoke poller The consumer contract checks the envelope, credit, website consent, media URLs and alt text, duplicate ids, dates and the absence of private keys. The smoke poller exercises 401, an authorised poll, one image download, entity-tag revalidation and an incremental read, and can run against staging or production. Refs #143 * docs(horizon): document the consumer smoke check and its evidence Refs #143 * chore(changelog): record the simulated Horizon consumer Refs #143 * refactor(collaboration): remove the Horizon-specific feed from the pilot The feed was a single-consumer prototype: a Horizon-named route, types and service, one deployment credential, no revocation, and no propagation of corrections, hiding or withdrawal to a consumer. That does not meet the external-sync design, so it moves to a focused follow-up (#157) with the manual export as the interchange in the meantime. Refs #143 #157 * feat(collaboration): assign operational owners in the admin panel Primary owner, backup, retention sweep owner, correction address and escalation details are now one audited administrator setting at /admin/collaboration/operations/. Personnel changes need no deployment. Saves require collaboration.manage, reject unknown or disabled members and a backup that duplicates the primary, resolve names for display, and record before/after values in an audit event. Closes the documentation-only ownership gap for the pilot. The roster now reports itself as unassigned until all three people and a contact are set. Refs #143 * docs(collaboration): record in-app owners and remove Horizon feed claims Point the operations runbook at the admin setting, remove the Horizon feed documentation and evidence, correct the privacy-version drift to the current policy, and add the owner-setting screenshot. Refs #143 #157 * chore(changelog): record operational owner settings and feed removal Refs #143 #157 * fix(collaboration): make operational coverage and correction addresses real One address model: the operations setting is the default, an invitation may override it, and an empty invitation field inherits. Public pages resolve that address instead of reading only the invitation. Readiness is revalidated on every read. An owner is ready only when the account is active, the membership verified and the member holds collaboration.review. The screen now distinguishes assigned from ready and names each reason; assigning someone no longer implies they can act. The settings write is versioned and transactional with its audit event, with a unique index on the global record, so concurrent saves cannot overwrite each other or leave a decision without its history. Refs #143 * docs(collaboration): record the address model and readiness checks Refs #143 * chore(changelog): record operational readiness and address inheritance Refs #143 * fix(collaboration): fail closed on signing secrets and tighten identity checks Production refuses to derive management tokens without a configured signing secret, instead of silently using the shared development value. A regression test covers production with and without a secret. The submission fingerprint now includes the invitation, so reusing a reference for another invitation is refused rather than returning the original record. The gallery publication API explicitly rejects written consultation responses. Refs #143 * docs(collaboration): restore the product model and correct readiness claims The product page had been overwritten with the operations runbook. Restore the model, consent, publication, claiming and retention material, then add the current ownership, address inheritance and readiness details. Correct the runbook's claim that a partial roster can be saved. Refs #143 * chore(changelog): record secret, fingerprint and documentation fixes Refs #143 * fix(collaboration): separate public story identity from management authority Public gallery and profile links now use a random storyId. The submission reference is never exposed publicly, so a visitor cannot replay a published story into a management token. A response is issued only when the request creates the contribution. Replaying an existing submission returns no token even with identical content; matching content is not proof of ownership. The original token still corrects and withdraws, and idempotent retries still avoid duplicates. Adds a unique partial index for storyId and a regression test that uses only information available from the public gallery. Refs #143 * fix(collaboration): treat a racing first owner save as a conflict Two simultaneous first saves hit the unique settings key. Resolve the duplicate key to a 409 version conflict instead of a 503, with real-MongoDB coverage for the race and for a stale save after success. Refs #143 * docs(collaboration): correct retention command and override monitoring Refs #143 * chore(changelog): record the management-token and owner-save fixes Refs #143 * fix(collaboration): never issue management authority to a lost insert race The duplicate-key recovery path returned the derived token even though that request did not create the contribution. It now returns no token, matching the sequential replay guarantee. Adds concurrent identical-submission regression tests on the in-memory preview and real MongoDB: one contribution, one token. Both fail if the recovery path returns the token. Refs #143 * chore(changelog): record the lost-insert-race token fix Refs #143

    2594e23 ↗
  3. UX & Perfstore
    Import domain modules directly and delete the barrel (#119) (#155)

    * refactor(store): import domain modules directly and delete the barrel (#119) Migrate every page, component and test importer from the deprecated src/lib/store.ts barrel to the owning domain module, then remove the barrel. The architecture test now fails if the barrel returns, if any source file imports it, or if a production lib module imports a page/component directory. * docs(architecture): document domain modules after barrel removal (#119) * chore(changelog): refresh snapshot for barrel removal (#119)

    017f71b ↗
  4. UX & Perflib
    Delete unclaimed read model and dead settings getters (#153)

    Remove buildAuthorizedMatterBriefing, which had no production caller: reporting, PDF and decision-record reads go through decision-record.ts, and the module's only consumer was its own test. Remove six exported settings getters that no production module called; the *State functions and DEFAULT_* constants remain the interface. No route, page, permission, DTO or settings behaviour changes. Update the architecture overview and hardening notes so they stop describing the deleted module. Refs #152

    6311c68 ↗
  5. UX & Perfdb
    Cut fresh database initialisation cost (#136) (#151)

    * perf(db): cut fresh database initialisation cost (#136) A fresh test database spent ~1.25 s in `initializeDatabase`, called 18 times per suite (~22 s). Index creation dominated: 92 `createIndex` calls, each a journal commit on a newly created collection. - Group the index catalogue by collection and send one `createIndexes` command per collection (46 commands). Keys, names, uniqueness, partial filters, TTL and `expireAfterSeconds` are unchanged; a failed grouped command falls back to per-index creation so one legacy conflict cannot block the rest, as before. - Bulk-write the 78 baseline policies instead of one upsert per record. - Split startup into `ensureDatabaseIndexes` (new `src/lib/db-indexes.ts`) and `seedBaselineContent`. `initializeDatabase` still runs both, so production startup and `getDatabase` are unchanged. Mongo tests that seed their own content use the schema half; notification-outbox keeps the full path and asserts the seeded register and indexes. - The in-memory preview implements `createIndexes` and `bulkWrite`. Verified on the local replica set: index phase 1.44 s -> 0.76 s and total 1.27 s -> 0.95 s over six interleaved pairs (shared host, so absolute wall time varied). A fresh database has the same 47 collections and 139 indexes, and the same 78 proposals and revisions, before and after. Full suite (833 tests) passed twice; each run left only `admin`, `config`, `engage` and `local`. * chore(changelog): record database initialisation change (#136) * fix(settings): tie-break site settings events by insertion order * chore(changelog): record the site event ordering fix

    ad8deae ↗
  6. Featuresettings
    Make public site settings stored and audited only (#128) (#144)

    * feat(settings): make public site settings stored and audited only (#128) Remove the environment fallbacks for search indexing, the header action, sharing image, social channels, branch directory, repository link and the public pulse poll. Stored values under Platform settings win; absent values use the documented code defaults. APP_MODE still supplies the production indexing default. The repository link is now editable in the Operations section instead of read-only, with URL validation, the operations audit section and no raw keys. Invalid saved values fall back to defaults and the settings page names the saved settings that could not be used. Align the stored-value sanitiser with the API validators so an invalid saved value cannot partly apply. Tests cover every removed variable having no effect, stored values winning, defaults, invalid fallback, API validation and audit. * chore(changelog): record public site settings migration (#128)

    90bc0c1 ↗
  7. UX & Perfstore
    Split store.ts god module into domain modules (#115) (#120)

    * refactor(store): split store.ts god module into domain modules (#115) * docs(architecture): add module-boundary rule and update store docs (#115) * test(store): enforce acyclic dependency graph across domain modules (#115)

    831e950 ↗
  8. Featuresettings
    CRM tuning and job gates as audited admin settings (#128) (#142)

    * feat(settings): move CRM tuning and job gates into audited admin settings (#128) Store CRM verification enablement, batch size, reconcile interval, outage alert threshold and request timeout, plus the scheduled digest gate, in the operational_settings collection. Each document is validated, defaulted and audited, and the admin settings page gains CRM verification and Scheduled jobs sections. The cron route, digest sender, verification cycle and health report now read enablement and tuning from the database. Missing settings mean off, matching the former unset-variable default. Invalid stored values fail clearly and are never clamped. The six environment variables and their PlatformEnv fields are removed. * docs(config): document CRM and job settings as administrator configuration (#128) Remove the migrated variables from .env.example, the environment table and the CRM and email guides. Document defaults, bounds, the admin locations and the deployment step required when upgrading from the environment gates. * chore(changelog): record CRM and job settings migration (#128)

    4e13843 ↗
  9. Featuresettings
    Operational health thresholds as audited admin settings (#128) (#141)

    * feat(settings): make operational health thresholds audited admin settings Move the eight operational health thresholds from environment variables to a single validated, audited setting: - scheduler warn/fail, digest warn/fail, verification warn/fail - ballot closure grace and email delivery reporting window The setting is one document in `operational_settings` (`_id: "thresholds"`) with documented defaults and whole-hour bounds. Warn must stay below fail. Validation rejects partial, fractional or out-of-range input field by field, and nothing is stored until the whole set is valid. Each change appends an event to `operational_settings_events` with the actor, time and only the changed fields, before and after. There are no secrets. `ops:health` reads the saved values and names each threshold's source as `settings` or `default`. A saved value that is missing, not an integer or out of range is reported as `unknown` with a plain-language action; the affected threshold is labelled as the default it fell back to. Warn/fail ordering is checked at evaluation too. The eight environment variables and their `PlatformEnv` fields are removed. `/admin/settings/` gains an Operational thresholds form built from the admin Card, Field, Input, Button and Alert primitives, with grouped pairs, defaults, ranges, inline errors, a success confirmation and the last audited change. The new `POST /api/admin/operational-settings` requires `settings.manage`, checks same-origin writes and returns field errors without internals. Tests cover validation, defaults, merging, audit shape, permission denial, same-origin rejection, API errors, health sources, invalid stored values, read failure, environment variables having no effect, and replica-set persistence. * docs(operations): point operational thresholds at the admin setting Remove the eight threshold variables from `.env.example` and the environment table. Document the administrator setting instead: defaults, whole-hour bounds, warn-below-fail ordering, and the audited change record. Record what remains on #128: CRM batch sizing, reconcile cadence, outage attempts, request timeout, the digest/CRM enablement gates and the site setting environment fallbacks. * chore(changelog): record operational threshold settings

    1ebab4e ↗
  10. Fixdiscussion
    Bound comment vote retries by time, not attempt count (#123) (#134)

    * fix(discussion): bound comment vote retries by time with backoff (#123) The comment vote compare-and-swap gave up after 12 fixed attempts with a 2-8 ms jitter. On a cold replica set the first write can take hundreds of milliseconds, so 25 concurrent voters exhausted the attempts and valid votes failed with 'Comment votes changed at the same time. Try again.' Retry on a five-second time budget instead, with exponential backoff and jitter (4 ms doubling to a 250 ms cap). Legitimate contention converges even when writes are slow; a genuinely stuck writer still fails in bounded time. Exactly-once is unchanged. The write is still one version-filtered compare-and-swap of the whole vote state, so a lost race writes nothing and retries against the committed state. Voter arrays, switching between upvotes and downvotes, and the persisted shape are untouched. Expiry now logs comment_vote_retry_budget_exhausted with the comment ID, attempt count and budget only - never member IDs or vote choices - before throwing. Tests add a deterministic cold-write case (40 ms per comment write) that fails under the old attempt count and passes now, plus a stuck-writer case proving the budget is bounded and the warning is emitted without identities. * chore(changelog): record bounded comment vote retries (#123) Regenerates the public snapshot so the fix commit appears on /changelog/. The 80-commit window still drops the oldest entries, which is the pre-existing truncation tracked in #96. * fix(discussion): make the comment vote retry budget configurable (#123) The 5 s retry budget was a fixed constant. Under full-suite load the injected 40 ms cold-write test needed longer than 5 s to converge and failed, even though votes were not actually lost. Read the budget from ENGAGE_COMMENT_VOTE_RETRY_BUDGET_MS at call time. Unset, empty or invalid values use the 5000 ms default; values are clamped to 250-60000 ms so a bad setting cannot remove the bound. The expiry warning records the effective budget. The stress test now runs with a 15000 ms budget, proving convergence under injected slow writes on a loaded machine while production keeps the 5 s default. The stuck-writer test uses the 250 ms floor so it stays fast, and asserts the default, fallback and clamp rules. Exactly-once is unchanged: the write is still one version-filtered compare-and-swap of the whole vote state, and no persisted shape or privacy boundary changed. * chore(changelog): record the configurable comment vote retry budget (#123) Regenerates the public snapshot so the stabilisation commit appears on /changelog/. * refactor(discussion): inject the comment vote retry budget instead of an environment variable (#123) Configuration belongs in the administration panel; environment variables are reserved for secrets, bootstrap and deployment topology. Remove ENGAGE_COMMENT_VOTE_RETRY_BUDGET_MS from the vote path. The production budget stays a fixed 5000 ms module constant. Tests pass an explicit optional fifth argument to voteOnComment, an injection point that is validated and clamped to 250-60000 ms; production callers omit it. The expiry warning still records the effective budget. The concurrency tests pass 15000 ms so a loaded runner cannot turn a machine stall into a false failure, and the stuck-writer test passes 1 ms (clamped to the 250 ms floor) so it stays fast. Exactly-once assertions, the persisted shape and the privacy boundary are unchanged. Docs remove the environment-override wording. * chore(changelog): record the injected comment vote retry budget (#123) Regenerates the public snapshot so the refactor appears on /changelog/. * chore(changelog): record bounded comment vote retries after merging main

    b0e0c81 ↗
  11. Docsconfig
    Make the admin panel the home of configuration, not the deployment (#133)

    * docs(config): make product ownership of configuration a standing rule Configuration belongs to the product, not the deployment. Adds AGENTS.md section 11: admin settings in MongoDB with validation, audit and defaults; environment variables reserved for secrets, the database, the public origin and deployment topology; every new variable justified in the change and in .env.example; operational thresholds, retry limits, cadences, toggles and policy timings are settings; tests inject values instead of tuning the deployment. Routes agents to the rule from the agent guide. The remaining operational environment knobs are tracked in #128. * fix(ballots): remove the tally projection deadline environment override ENGAGE_BALLOT_TALLY_DEADLINE_MS let the deployment stretch the 500 ms display-projection deadline, which is operational tuning in an environment variable. The wrapper already takes an explicit deadlineMs, so production now uses the fixed constant and callers with different needs pass a value. The projection suite no longer sets the variable. It waits a bounded time for the projection to equal the authoritative tally and, where a best-effort write was abandoned on the slow shared replica set, reconciles the row through the documented repair path before asserting. Encrypted ballots pass the explicit expected tally and decryption keys. Equality assertions are unchanged. Refs #128 * chore(changelog): record the configuration rule and projection deadline removal * chore(changelog): record the configuration policy after merging main

    9e56766 ↗
  12. Ops & CIquorum
    Stop leaking per-case replica-set databases (#132)

    * test(quorum): drop each replica-set database and document test hygiene * chore(changelog): record the test database hygiene fix

    34c8d17 ↗
  13. Featurediscord
    Post the weekly digest as an embed (#131)

    * feat(discord): post the weekly digest as an embed (#129) Replace the plain-text weekly post with one Discord embed: a Horizon accent rule, an intro line, a linked field per featured proposal showing its stage and activity, and a short footer. The embed title links to Engage; the test post is labelled in the embed title and footer. Proposal titles remain escaped and mention-neutralised inside the embed, and allowed_mentions still permits only the configured role. The admin preview now renders the embed wording and links instead of the raw payload. * chore(changelog): record the Discord digest embed

    e27a109 ↗
  14. Ops & CIplatform
    [Consolidated] Two-tier quorum and Discord attention-debt digest (#127)

    * feat(discord): add attention-debt ranking and safe weekly webhook delivery (#125) * chore(discord): configure safe opt-in digest settings (#125) * chore(discord): configure safe opt-in digest settings (#125) * chore(discord): configure safe opt-in digest settings (#125) * feat(discord): expose guarded weekly scheduler and admin test API (#125) * feat(discord): expose guarded weekly scheduler and admin test API (#125) * feat(discord): add digest preview and test-send to engagement admin (#125) * feat(discord): wire admin preview and safe test-send controls (#125) * fix(discord): rank inaugural proposals by attention, not legacy creation date (#125) * fix(discord): determine Melbourne digest week independent of locale formatting (#125) * test(discord): cover attention-debt fairness, launch cohort and isolated webhook delivery (#125) * fix(discord): escape titles safely and type delivery ledger (#125) * docs(discord): document launch cohort, algorithm and test-server rollout (#125) * docs(discord): register digest channel and scheduled endpoint (#125) * style(discord): format read-only message preview (#125) * fix(discord): link directly to eligible open ballots and discussions (#125) * refactor(discord): isolate safe webhook URL validation (#125) * feat(discord): persist encrypted, audited webhook and schedule settings in Engage (#125) * feat(discord): read in-app settings and enforce editable weekly schedule (#125) * fix(discord): preserve immutable settings record key during updates (#125) * feat(discord): add admin-only encrypted integration settings API (#125) * feat(discord): add in-app webhook, role and schedule configuration UI (#125) * feat(discord): integrate Discord configuration into Platform settings (#125) * fix(discord): report saved config and enforce settings authority (#125) * chore(discord): move integration configuration out of environment variables (#125) * chore(discord): move integration configuration out of environment variables (#125) * refactor(discord): centralise setup and testing in Platform settings (#125) * refactor(discord): remove superseded engagement dashboard controls (#125) * fix(discord): actually remove saved secrets from MongoDB on clear (#125) * test(discord): exercise isolated sending through stored encrypted config (#125) * test(discord): cover encrypted in-app settings, removal, isolation and schedule (#125) * docs(discord): document in-app encrypted settings and configurable schedule (#125) * docs(discord): align scheduled jobs and settings architecture (#125) * feat(ballots): add two-tier constitutional-style quorum Evaluate platform quorum (30 eligible registered members) and ballot quorum (max(ceil(sqrt(N)), min(30, ceil(N/2)))) once at closure, inside the closure transaction. Persist one immutable ballot_quorum_records snapshot with the electorate, thresholds, participation, tally and verdict. Certification refuses a missing, unreadable or mismatched snapshot and cannot override a quorum failure into approval or rejection. Ballots closed before the rule keep the approval-only basis. Record genuine signed-in use as a daily activity signal for the 90-day active electorate. Refs #122 * feat(proposals): explain quorum to members and officers Show the current eligible registered membership, active electorate, estimated requirement, participation and the closure caveat on every ballot page. After closure, show the recorded calculation and whether each test was met. Give administrators the same calculation and any closure anomaly on the proposal workspace and inline outcome control. Inconclusive ballots are presented as neither adopted nor rejected, and a quorum failure can only be recorded as inconclusive. Refs #122 * test(discord): type string-keyed MongoDB settings fixture (#125) * docs(discord): document in-app settings endpoint (#125) * fix(discord): support Node strip-only TypeScript test runtime (#125) * docs(governance): record the two-tier quorum decision and basis Record D37–D39 and the rule 36 adaptation: platform quorum, ballot formula, the 90-day active member definition, closure immutability, inconclusive failure and the no-override rule. Note that rule 30(4)(e) AGM obligations continue and that rule 98 confirmation is still needed before the first post-adoption closure is treated as binding. Update the public explanation, legal Terms wording, lifecycle, data model, capability and known-gap records, and add the quorum procedure page. Refs #122 * test(ballots): cover quorum boundaries and closure evidence Cover the published formula and its transitions, platform boundaries, approval and quorum separation, abstentions, vote changes, duplicate participation, zero active members, legacy pre-rule closures, open ballots at rollout, membership changes after closure, participation mismatch, missing snapshots and concurrent closure with a membership update. Move existing certification mechanics fixtures to pre-rule closures so they keep testing the approval rule. Refs #122 * fix(discord): use accessible confirmation for removing saved webhooks (#125) * fix(proposals): clarify zero active electorate in quorum displays Show 'No active electorate yet' rather than a zero participant target, and show recorded participation without a misleading 'of 0'. This keeps the formula exact while making the small-electorate state understandable. Refs #122 * test(discord): allow same-week catch-up when the scheduled slot was missed (#125) * docs(discord): clarify same-week scheduling catch-up behaviour (#125) * chore(changelog): record the two-tier quorum work Refs #122 * fix(ballots): close the activity window at the ballot deadline Cap every activity source at the closure timestamp and anchor the snapshot to the official deadline rather than a late scheduler run. Post-deadline browsing must not enlarge the active electorate. Refs #122 * chore(changelog): record the quorum activity-window fix Refs #122 * docs(governance): state the zero-active quorum edge case Refs #122 * chore(changelog): record the quorum edge-case note Refs #122 * test(ballots): keep projection certification case pre-quorum Refs #122 * chore(changelog): record the projection test fix Refs #122 * chore(changelog): refresh for the consolidated branch Refs #122, #125 * test(discord): assert webhook fields are absent, not substrings Resolve CodeQL's incomplete URL substring sanitization alerts in the secret-redaction test without weakening the assertion. Refs #125 * chore(changelog): record the Discord test hardening Refs #125

    5eb4e20 ↗

16 November 2026

7 commits
  1. Fixballots
    Remove the tally projection watermark and make rebuilds compare-and-set only (#124)

    * fix(ballots): make the tally projection rebuild compare-and-set only The merged projection skipped increments whose vote timestamp was at or below an appliedThrough watermark that a rebuild believed it had counted. Under concurrency that watermark was wrong: a vote could be visible to the increment but not the recount, so the increment was skipped and the row under-counted. The full suite failed on main with 7 votes in the row against 8 votes. Remove appliedThrough and its timestamp guard entirely. Increments always apply: each is one atomic upsert of the choice, total and an internal monotonic version. Nothing is skipped. The rebuild is now absolute and compare-and-set only. It reads the row version (0 when the row is missing), recounts every bound vote, and writes absolute counts only if the version is unchanged, advancing it by one. A mismatch recounts and retries, bounded. A concurrent increment either lands before the recount (the absolute write is correct) or after the compare-and-set (it adds on top). The 500 ms deadline still writes nothing, leaving the row for the repair CLI. Revision moves remain transactional deltas and certification still never reads the projection. Tests: 20 rounds that deterministically interleave an increment between the rebuild's recount and its compare-and-set (and after it), asserting exact equality with the authoritative bound tally every round; an increment after an absolute rebuild is applied; the concurrent first-vote, change and revision-move cases remain. The projection test file raises its write deadline under load because a timed-out write is allowed to be abandoned; the timeout case still asserts that nothing is written. Refs #52 * docs(status): record the compare-and-set-only projection rebuild Removes the appliedThrough watermark description and records the merged under-count it caused. Documents the current contract: unconditional atomic increments, transactional revision moves, and an absolute recount that writes only when the row version is unchanged, retries when it moved, and writes nothing at its deadline. Records the 20-round interleaved race test, the 12-test projection suite run ten times, both 713-test full-suite runs, the residual delayed-increment window, and the configurable test deadline. Refs #52 * chore(changelog): record the compare-and-set-only tally projection Regenerates the public snapshot from this branch's history. The generator's fixed 80-commit window drops the oldest entries, which is the pre-existing truncation tracked in #96, not a decision in this slice. Refs #52 * chore(changelog): record the projection race fix after merging main

    8693fbb ↗
  2. Featureprofiles
    Add profile visibility and CRM identifier seam (#121)

    * feat(profiles): add profile visibility and CRM identifier seam Let owners hide their public profile; other viewers and visitors receive 404 and author links are suppressed, while the owner keeps a preview. Extend the profile settings route to update biography and visibility together. Add an opt-in CRM identifier seam: with ENGAGE_PROFILE_CRM_IDENTIFIERS=on, an active CRM identity link becomes the canonical profile path and legacy member-id paths redirect with 301; the lookup is local and off by default. Add coverage for both behaviours and verify the visibility control in the browser harness. Refs #113 * docs(profiles): document profile visibility and CRM redirect Record the owner visibility switch, hidden-profile 404 and link suppression, the opt-in CRM identifier seam and its 301 behaviour, initials-only avatars, the absent self-service account deletion, and the display-only comment score. Refs #113 * chore(changelog): record profile visibility and CRM redirect Refresh the public changelog for the owner visibility switch and the opt-in CRM identifier seam, preserving older entries outside the generator's 80-commit window. Refs #113 * chore(changelog): record profile visibility after merging main Regenerate the snapshot on the merged branch and preserve older entries outside the generator's window. Refs #113 * fix(profiles): harden partial updates and CRM id collisions Write only the profile fields supplied by a partial update and return the persisted values, so a biography-only save cannot restore an older visibility choice. Refuse to publish a CRM person id that collides with another member id, and return 404 for an ambiguous path instead of rendering the wrong person. When profile settings fail to load, disable the form and show an error rather than defaulting visibility to public. Add coverage for partial updates and the 24-hex collision case. Refs #113 * chore(changelog): record profile hardening fixes Refresh the snapshot for the partial-update and CRM-collision fixes. Refs #113

    2767fcc ↗
  3. UX & Perfproposals
    Paginate the public list and add a display-only tally projection (#52) (#112)

    * feat(ballots): project display-only tallies after a committed vote Public list pages (/ and /proposals/) tallied every vote and decrypted every encrypted ballot just to show a count. Add a display-only ballot_tallies row per (ballotId, revisionId), written best-effort after the vote transaction commits. The projection is never authoritative: recordFormalDecision keeps recomputing the outcome from the bound votes and does not read it. A failed or slow projection write is logged as an operational event and cannot fail, delay or alter the vote. Vote changes decrement the previous choice and increment the new one, a re-cast of the same choice is a no-op, and rows are revision-scoped. The row stores counts and a timestamp only: no member id, choice, reason or envelope. listProposals can now omit vote tallies so public reads never touch proposal_votes; the web pages overlay certified results and the projection in the next commit. Adds the unique compound index to initializeDatabase and a rebuild/repair path for the CLI. Refs #52 * perf(proposals): paginate the public list and stop scanning ballots /proposals/ loaded every proposal, applied search, stage, branch and sort in the page, and decrypted every vote for the row totals. It now reads a bounded display page of 25 rows from MongoDB with server-side pagination. - Page, total, page count and range are computed from the filtered set; invalid or out-of-range pages clamp; ties order deterministically by proposal id. - Links keep q, stage, branch, space, sort, focus and joined; changing a filter starts at page 1. Pagination uses the Button primitive with previous/next and a live range status. - Each page self-references its canonical address and emits rel=prev/rel=next. The repository has no noIndex convention for parameterised lists, so pages stay indexable with a self-canonical rather than inventing one. - Rows no longer read proposal_votes. A certified ballot shows the tally stored on ballot_results; otherwise a fresh ballot_tallies row is used; a missing or stale row shows "Voting open — tally updating" with a link to the matter. - / overlays the same projection on the register it already reads, so home no longer decrypts votes either. Matters without a trustworthy aggregate are left out of the highlights rather than showing a wrong percentage. Visibility is still decided by canViewProposal and re-checked after the coarse MongoDB pre-filter; eligibility, ballot binding and deadlines are untouched. Refs #52 * feat(scripts): rebuild the ballot tally projection from votes Add npm run ballots:tally-projection. It reports missing, mismatched and orphan projection rows against the votes they should represent, and with --apply rebuilds them. It never deletes, edits or rewrites a vote and never certifies a result. Dry run is the default; --verify exits non-zero when rows need repair; an explicit --database is required; production writes additionally require --allow-production and --confirm-production engage_production. Encrypted votes need the ballot keys and the tool refuses to write a partial tally without them. Refs #52 * fix(proposals): keep the active stage tab and certified tallies correct The parsed stage is now '' rather than 'all' for an unfiltered list, so the All tab has to compare against '' to stay marked current. A certified result is authoritative even when the matter no longer carries a ballotRevisionId (for example after a zero-vote unbind). Resolve certified results by every visible matter's ballot, not only those with a current binding, so the row shows the recorded tally instead of falling back to no tally. Refs #52 * docs(status): record public list pagination and the tally projection Adds the before/after harness snapshots for / and /proposals/ (before 57402f0, after 65ace21) and records what changed: 25-row server pagination with filter preservation and canonical/rel links, a display-only ballot_tallies projection, certified tallies from ballot_results, and a neutral tally-updating state for missing or stale rows. The profiler window records 3 -> 0 proposal_votes operations on /proposals/ and 6 -> 0 on /, with getMore batches falling from three to one on every measured public page. Reports the /proposals/ HTML increase honestly: it renders 25 rows instead of 15 at the specified page size, not extra markup per row. Updates I12 and S4, notes the detail page's remaining live tally and the deployment step to backfill the projection, and adds the new collection and CLI to the architecture docs. Refs #52 * fix(ballots): move a re-bound amendment tally to the right revision row An amendment ballot can be re-bound to a newer wording revision. A member who had already voted on the previous revision casts again on the new one, so the previous count belongs to the old row, not the new row. The projection now learns the revision the previous vote was bound to and recounts both rows from their votes instead of applying a delta to the wrong row. Main matter ballots cannot reach this path: castVote refuses a ballot whose existing votes are not all bound to its current revision. Adds a projection test for the move. Refs #52 * docs(status): correct the public-list suite count The final run includes the revision-move projection test: 655 tests, 0 fail. Refs #52 * chore(changelog): record public list pagination and the tally projection Regenerates the public snapshot from this branch's history. The generator's fixed 80-commit window drops the oldest entries, which is the pre-existing truncation tracked in #96, not a decision in this slice. Refs #52 * fix(ballots): make tally projection writes atomic under concurrency The projection's first-vote path read the votes and wrote absolute counts when no row existed. A concurrent increment could land between that read and write, or after it, double counting; the full suite exposed it as an extra abstain. The normal path is now one atomic upsert increment, so a first vote creates the row and counts it in a single operation. Two concurrent first votes can no longer each create a row or lose one. A write conflict from a transactional revision move retries inside the deadline. The only remaining recount is for an unreadable prior vote and the repair CLI. It is compare-and-set guarded on an internal version token and bounded by a watermark recorded in appliedThrough, so an increment for a vote the recount already included is skipped, and an increment that landed first forces a fresh recount. The deadline is enforced before each write (and with maxTimeMS on the recount), so a timed-out rebuild leaves the row for the repair CLI instead of writing a stale absolute count. A revision move is two transactional deltas on the old and new rows, not a recount. A row whose counts are negative or do not sum to its total is never displayed; it reads as tally pending until repaired. Tests: many concurrent first votes, concurrent vote changes and a concurrent revision move each equal the authoritative tally; ten rebuild-versus-increment races; a recorder that a timed-out rebuild writes nothing; and the public list treating an inconsistent row as pending. Refs #52 * docs(status): record the race-safe projection write strategy Replaces the read-then-write description with the atomic strategy: an upsert increment for normal votes, transactional deltas for a revision move, and a compare-and-set recount bounded by a watermark and deadline for the last-resort path. Records that an internally inconsistent row is displayed as pending, the residual out-of-order watermark caveat, the concurrency tests and both full suite results. Refs #52 * chore(changelog): record the race-safe tally projection writes Regenerates the public snapshot from this branch's history. The generator's fixed 80-commit window drops the oldest entries, which is the pre-existing truncation tracked in #96, not a decision in this slice. Refs #52 * chore(changelog): record public read models after merging main

    b8320aa ↗
  4. Featureprofiles,proposals
    Public member profiles and action-led policy changes (#117)

    * feat(profiles): add public member profiles and editable biography Build a viewer-relative profile read model over existing accounts, comments, proposals, amendments and branch memberships. Profile pages show an initials avatar, optional biography, geographic affiliation, contribution statistics and display-only comment karma, with paginated Comments, Proposals and Amendments tabs and deep links to the exact discussion anchor. Deleted comments, withdrawn amendments and proposals the viewer cannot open are excluded from history, counts and karma. Owners edit a plain-text biography through an origin-checked member route; no separate profile or contribution collection is introduced. Adds profile lookup indexes for comments and amendments. Refs #113 * feat(discussion): link authors to public member profiles Comment names and avatars, the proposal author and amendment authors now link to the public profile when a member id establishes authorship. Disabled accounts render as plain text and truncated historic records without a displayable name are not linked, so the interface never invents an author or offers a dead profile link. Top support and concern takeaways use the same link, and the proposal activity timeline targets the exact amendment anchor. Refs #113 * test(profiles): cover visibility, privacy, pagination and deep links Add in-memory read-model tests for private, branch and archived visibility, deleted comments, withdrawn amendments, legacy policyId comments, karma, deterministic pagination, disabled accounts, historic authors and owner-only biography writes. Add route checks for session and origin enforcement. Add a Chromium harness that follows an author link from a discussion, checks profile tabs and statistics, follows a comment deep link, verifies empty tabs and the 404 page on desktop and mobile, and wire it into CI after the production build. Refs #113 * docs(profiles): document public profiles, visibility and display-only karma Record the profile read model, owner biography field, viewer-relative filtering, profile indexes, biography route, browser harness, capability rows and the remaining privacy limits. Explicitly state that karma never affects eligibility, permissions or proposal authority. Refs #113 * test(profiles): cover the MongoDB karma aggregation Exercise the profile read model against MongoDB so the database-side karma sum is verified, not only the in-memory fallback. The suite skips when VOTING_TEST_MONGODB_URI is not configured and uses a unique database name. Refs #113 * refactor(profiles): rename comment karma to comment score Use the accurate product term for the sum of net scores on visible comments, and remove the always-visible explanatory note. Rename the internal field and function so the old term cannot return through future UI work. Refs #113 * feat(proposals): make policy changes follow the chosen action The policy-change form now treats amend, replace and repeal as distinct member tasks. The selected action drives the page heading, default title, primary question, effect timing and visible fields. Repeal asks for a rationale and hides commitments; an amendment can name the part to change; a replacement can carry proposed wording. Policy changes inherit the published policy's topic and governance context, so members no longer re-enter a topic or scope. Open change proposals for the same policy are shown before the form so members can join the discussion. The action-specific fields are stored with the proposal, included in the revision snapshot and locked once voting begins. Fixes the stale Amend title when Repeal is selected. Refs #114, #97 * test(proposals): guard action-led policy change form wiring Assert that the action selector announces the choice, the page updates the title and question from the chosen action, repeal hides commitments, and the form inherits the policy topic while showing existing change proposals. Refs #114 * chore(changelog): record public profiles and policy change UX Refresh the public snapshot for public member profiles and the action-led policy-change form. Preserve entries outside the generator's 80-commit window so the public history is not shortened. Refs #113, #114

    72c1cd4 ↗
  5. Featurediscussion
    Thread comments with Reddit-style voting and Best ranking (#110)

    * feat(discussion): render threaded replies with confidence-weighted voting Proposal discussion now stores parentCommentId and depth, renders one recursive comment component instead of a flat list, and keeps replies inside their parent's subtree when sorting. Deleting a comment that still has replies clears the body and keeps a placeholder so the thread does not lose context. Comments take upvotes and downvotes with one active vote per member. Responses return aggregate score, counts and percentage plus the caller's own choice; voter identities are never serialised. The default Best sort applies a Wilson score lower bound to every sibling group, with Top score, Newest and Oldest as alternatives and deterministic tie-breaking. Refs #57. * chore(ci): verify threaded discussion in a real browser Runs the isolated Playwright harness after the perimeter check. It proves parent-first nesting, sibling sorting, deep mobile layout, reply/delete interactions and that the comment API returns aggregate signal only. Refs #57. * docs(discussion): document threading, comment votes and Best ranking Updates the canonical model, API contract, capability matrix and known gaps. Records that comment votes are display ranking only, that voter identities are never returned, and the residual risks around rate limiting, audit and exact aggregate downvote counts. Refs #57. * chore(changelog): record threaded discussion and comment voting Refreshes the public snapshot after the discussion feature, CI verification and documentation commits. The generator's existing 80-commit window still drops older entries (#96); no history was edited by hand. Refs #57. * fix(discussion): make comment vote writes atomic under concurrency Adds a voteVersion compare-and-swap to comment vote updates. A concurrent vote bumps the version, so a stale write is retried against the latest state rather than overwriting it. Covers 25 simultaneous voters and same-member double clicks against both the in-memory database and a real MongoDB replica set. Refs #57. * chore(changelog): record atomic comment vote updates Refs #57. * fix(activity): show the comment's net score, not upvotes alone Member activity previously labelled a contribution with its upvote count, which is misleading now that comments can be downvoted. Show the net score as points, consistent with the discussion thread, and keep vote identities out of the feed. Refs #57. * chore(changelog): record the activity score fix Refs #57. * chore(changelog): regenerate after merging main * fix(discussion): guard tombstoned comments, empty menus, and vote actions

    9235057 ↗
  6. UX & Perfheader
    Replace the notification React island with a native disclosure (#52) (#111)

    * perf(header): replace the notification React island with a native disclosure The signed-in header fetched unread notifications from a React island hydrated with client:idle, which shipped the React runtime (~330 KB) on every signed-in page for one small bell. The bell is now a native <details>/<summary> disclosure backed by a small vanilla module. It reads the same read-only inbox endpoint without caching, only after idle or first open, and renders the latest five notifications. Escape closes it and restores summary focus, outside clicks close it, and only one header panel stays open. Without JavaScript the summary's anchor still opens the notification centre. Marking notifications as read remains in the member notification centre. Refs #52 * fix(header): match the notification panel to the established header shadow * docs(perf): record the React-free header measurements and remaining #52 scope The audit now reports the signed-in header before/after harness snapshots, the pages that no longer ship React, the unchanged database command counts and the inline-script trade-off on anonymous pages. The tracker's I12 line records the header slice as done while leaving the tally read model and member-list pagination as the remaining #52 work. Refs #52 * chore(changelog): refresh the snapshot for the header performance work * fix(header): keep a retry from issuing duplicate inbox reads * chore(changelog): refresh the snapshot for the header retry guard * chore(changelog): record the header performance work after merging main

    57402f0 ↗
  7. Fixmember,admin
    Keep unread updates and label votes correctly (#108, #56) (#109)

    * fix(member): keep unread updates until the member dismisses them My Engage advanced engage_member_last_seen on every page load, so navigating away and back hid updates the member never opened. Reading the page now only resolves the window; the cursor advances only through POST /api/member/updates/dismiss. Adds a 'Mark updates as seen' action to the catch-up digest, a matching status message, a seven-day window for members who have never dismissed updates, and a pure helper so the window, list and counts share one rule. Refs #108 * fix(admin): classify votes as votes in the participation feed The panel built vote activities with kind 'vote' but only handled 'votes', so every vote rendered as a proposal submission with the wrong filter and count. Encrypted ballot records carry no member identity, which made the mismatch affect all recent votes. Votes, contributions and proposals now share one classifier and one seven-day window. Vote rows use the recorded timestamp and the existing canViewIdentifiableBallots gate; encrypted records render as 'A member' and choices, reasons, tallies and envelopes are never read. Replayed records collapse by ballot and voter, while separate ballots and voters remain separate rows. The summary strip and tabs are derived from the same rows, and the previously truncated feed now shows the whole window. Refs #56 * chore(changelog): regenerate snapshot for member updates and participation fixes * chore(changelog): record the member and participation fixes

    29c794d ↗

15 November 2026

19 commits
  1. Docsstatus
    Record the merged command layer and paginated register (#107)
    d642bfc ↗
  2. Ops & CIplatform
    Rewrite Engage copy around political participation (#97) (#98)

    * fix(copy): clarify participation and public discussion (#97) * docs(copy): record delivered batch and resumable PR (#97) * fix(copy): invite participation across homepage queues and highlights (#97) * fix(copy): explain participation and current decision process (#97) * docs(copy): record guide delivery and preserve changelog history (#97) * fix(copy): make proposal discovery and submission clearer (#97) * docs(copy): checkpoint proposal form delivery (#97) * fix(copy): clarify ballot status, amendments and proposal history (#97) * docs(copy): checkpoint ballot review and validation (#97) * fix(copy): distinguish policy adoption records and community input (#97) * docs(copy): checkpoint policy and community review (#97) * fix(copy): explain sign-in and optional member participation (#97) * test(copy): align membership label assertion and checkpoint progress (#97) * fix(copy): explain member setup, branch following and notifications (#97) * docs(copy): checkpoint member setup and preferences (#97) * fix(copy): make participation emails and unsubscribe wording clearer (#97) * docs(copy): checkpoint participation email review (#97) * fix(copy): clarify officer tasks and member decision authority (#97) * docs(copy): checkpoint governance administration review (#97) * fix(copy): clarify administration settings and public visibility direction (#97) * docs(copy): checkpoint remaining administration review (#97) * fix(copy): reconcile final notices, errors and terminology (#97) * docs(copy): finalise editorial coverage and resumable handover (#97)

    b9286f4 ↗
  3. UX & Perfadmin
    Paginate the proposal register and stop reading ballots (#52) (#103)

    * perf(admin): paginate the proposal register and stop reading ballots The proposals register loaded every proposal, including its rationale, and decrypted every vote for the rows in Decide so it could show live tallies. It sent ~1 MB of HTML and did per-vote work on a list read. The register now reads a bounded page of 25 rows from MongoDB, ordered by proposal id, with search, stage and branch filters applied server-side and the viewer's branch scope preserved. Page links keep the active filters; changing a filter starts at page 1; invalid or out-of-range pages clamp. Pagination uses the existing Button primitive with previous/next, the current page and a status region announcing the visible range. `listProposalRegister` projects the register fields only (no `details` or `detailHtml`) and never touches `proposal_votes`, so no ballot is decrypted on a list read. For a certified ballot it shows the tally, computed result and rule basis stored on `ballot_results` at certification. An open ballot shows "Open — view ballot" instead of live counts, and a closed but uncertified ballot links to the workspace to record the outcome. The detail workspace keeps the live bound tally and the result form unchanged; recording from the list would require decrypting every vote. Editing, revising and creating still resolve their full record, including rationale, from any page, with the same scope and lock checks. Measured with `npm run perf:render` (78 synthetic proposals, 1200 votes, 3 runs, administrator): HTML 938,422 B → 283,915 B (−69.7%); document DB commands 19 → 16; document DB time 28.7 ms → 16.0 ms; TTFB 103.1 ms → 57.6 ms. A MongoDB profiler window shows the register request reads proposals, comments, ballot_results, ballots, amendments and revisions, and no `proposal_votes`. Refs #52. * fix(admin): keep legacy register records keyed by policyId and status Legacy proposal documents store the identifier, stage and topic space under `policyId`, `status` and `category`. The register's narrow projection only asked for the current field names, so the shared normaliser would have seen an empty identifier and defaulted the stage to Deliberate. Project the alias fields too (still excluding rationale and ballot data), and match the stage filter against a stored `status` when a document has no `stage`. Adds a regression case for a legacy-shaped record: it keeps its identifier, its normalised stage, its space, and remains searchable by rationale without returning it. Refs #52. * docs(status): record register pagination and the tally-free list read Adds the before/after harness snapshots for `/admin/proposals/` (base `78c07c0`, after `c1f72c0`) and records what the register now reads and shows: one 25-row projected page, no `proposal_votes` access, certified tallies from `ballot_results`, and links instead of live counts for uncertified ballots. Records the trade-offs honestly: inline outcome recording moved to the workspace, "Open amendments" counts the whole register rather than the filtered subset, and search moved into MongoDB while still matching rationale. Updates I12/#52 without claiming the member-facing vote scans are done, and notes the small in-memory database fidelity improvements from this slice. * chore(changelog): refresh snapshot for register pagination Regenerates the public changelog from this branch's history: the register pagination, the legacy-record fix and the audit/status updates appear as the newest entries. Side effect of the generator's fixed 80-commit window: the oldest entries fall out of the snapshot. That truncation is the pre-existing generator defect tracked in #96, not a decision in this slice. * chore(changelog): record the register pagination after merging main * chore(changelog): record the register pagination after merging main * chore(changelog): record the register pagination after merging main * feat(admin): add on-demand inline outcome recording and address register review findings

    86f9de6 ↗
  4. UX & Perfgovernance
    Typed ballot commands and central route policy (#53) (#94)

    * refactor(governance): add typed ballot commands and central route policy Extract ballot.bind and ballot.record_result into typed commands that call the existing domain functions, and declare both routes in one policy table. Routes now validate input, run the command and map errors; no permission literals or role checks remain in the route files. No governance behaviour changes. * test(governance): prove ballot command and route policy equivalence Cover policy-table drift, the authorisation matrix for both commands, route authentication, bind idempotency and record_result preconditions against a real MongoDB replica set. Existing route suites continue to exercise the same behaviour. * docs(governance): document the command contract and mark #53 partial Describe the typed command contract, the central route policy table and the two-stage authorisation rule. Record that the ballot lifecycle is extracted while proposals, amendments and membership remain route-local. * chore(changelog): refresh the snapshot for the ballot command layer * fix(governance): preserve bind route error mapping and harden route drift guard Map domain errors per route so a BallotDomainError escaping bind still returns the generic 400, while result keeps its 409. Discover governed routes recursively across .ts, .js and .mjs with all handler export forms. Rename the route-level helper to authoriseGovernanceRouteRole and document the deliberate coarse-gate repeat. Correct the precondition wording: the delegated domain function enforces it. * test(governance): cover bind conflict status, route scope denial and recursive discovery Prove the bind route still returns 400 with one binding event for a conflicting ballot revision, prove an out-of-branch result request is denied with no write, and prove each declared audit event is written. Add temporary-directory fixtures for nested, index, JavaScript and re-exported routes, plus a malformed-body ordering check. * docs(governance): correct command preconditions and route policy scope Preconditions and effects are documentation enforced by the delegated domain function, not re-checked by the command layer. Describe the coarse role gate, its defensive repetition, per-route error mapping and recursive route discovery. * chore(changelog): refresh the snapshot after the PR review fixes * chore(changelog): record the command layer after merging main * chore(changelog): record the command layer after merging main * chore(changelog): record the command layer after merging main * chore(changelog): record the command layer after merging main * chore(changelog): record the command layer after merging main * chore(changelog): record the command layer after merging main * chore(changelog): record the command layer after merging main * fix(governance): inspect multi-binding route exports and clarify command preconditions

    c94e3f9 ↗
  5. Featureadmin
    Administrator responsibility queue (#54) (#106)

    * feat(admin): add the administrator responsibility queue (#54) Group ballot outcomes, closing ballots, unbound wording, overdue advancement, amendment decisions, member verification and publication into one queue. Every item names the authority that makes it actionable and is filtered server-side by permission and branch scope. A failed source degrades to one short message for its group. * docs(status): record the administrator responsibility queue (#54) The queue is built and tested; multi-amendment derivation, collision review and role legibility remain outstanding. Note that publication failures have no durable failed state to queue. * chore(changelog): refresh the snapshot for the responsibility queue * fix(admin): never imply a ballot close date that was not recorded A legacy closed ballot with no close time now says only that it closed, instead of presenting the current date as the close date. * chore(changelog): refresh the snapshot for the queue close-date fix

    b2fd65a ↗
  6. Featureproposals
    Member-facing decision record (#54) (#105)

    * feat(proposals): add member-facing decision record Compose one matter's immutable voted wording, revision history, amendment outcomes, certified ballot result and publication state in a permission-aware read model. Derive adopted wording under D15 (zero applied amendments) and D16 (one applied amendment), with explicit review states for two or more applied amendments (D17-D18), approved-but-unapplied amendments and mismatched result wording. No individual votes, voter or author identifiers cross the read-model boundary. Add /proposals/[slug]/record/ and link it from the proposal page. * docs(governance): record the decision-record read model Document the member-facing decision record, the D15/D16 derivation, the explicit D17-D18 collision-review seam and the outstanding administrator queue. Mark S2/#54 partial and note the reporting limit on inter-amendment gaps. * chore(changelog): refresh the snapshot for the decision record

    be5f523 ↗
  7. Featureci
    Run the perimeter browser harness on every pull request (#38) (#104)

    * fix(security): bound the perimeter browser harness and always clean up The harness now has a hard 180-second deadline (ENGAGE_PERIMETER_TIMEOUT_MS) that stops the run and fails instead of hanging, signals the preview server before any await, escalates to SIGKILL, bounds Chromium shutdown, and kills the child from a process exit handler as a last resort. A page error, failed request or CSP violation that appears after a page's own check also fails the run. Adds 'perimeter:browser' for local use; a build and ENGAGE_PLAYWRIGHT_MODULE are still required. * feat(ci): run the perimeter browser harness on every pull request Runs scripts/security-perimeter-browser.mjs after the build and after the existing Playwright 1.57.0 install, reusing the same ENGAGE_PLAYWRIGHT_MODULE path rather than installing a second copy. Extends src/lib/ci-workflow.test.ts to compare step positions, so it fails if the step disappears, moves before the build or the Playwright install, installs its own Playwright, or if 'perimeter:browser' and the harness file drift apart. * docs(security): record that the perimeter harness runs in CI States what the CI step proves, how it is made safe to run unattended, and the remaining gap: the production build against the in-memory seed, not Cloudflare/Coolify, a real MongoDB or the real providers. * chore(changelog): refresh the snapshot for the perimeter CI step

    9478783 ↗
  8. Featurenotifications
    Durable outbox for ballot opened and closing soon (#33) (#102)

    * fix(notifications): write the delivery dedupe key the unique index requires The notification_deliveries unique index is on dedupeKey, but in-app and push delivery documents only set a composite _id. Every insert after the first therefore collided on a missing dedupeKey and was swallowed as a duplicate, so production could create at most one inbox item in total. Write the composite value to dedupeKey (and a push equivalent), keeping the existing _id dedupe contract and index shape unchanged. * feat(notifications): wire ballot opened and closing soon through a durable outbox Add notification_outbox, written immediately after a committed lifecycle transition and drained by npm run notifications:drain (dry-run by default, --apply to send). Two events are wired: a ballot opened by the lifecycle scheduler (new_ballots) and an open ballot inside the approved seven-day window (closing_deadlines). The audience is the voting electorate. Candidates are confirmed with getProposalEligibility and canViewProposal, the same predicate and visibility gate used when casting a vote, and eligibility is checked again at drain time so a revoked membership is suppressed rather than notified. Rows carry one unique dedupeKey per member, ballot and event; the drain claims with a conditional lease, retries at 1/2/4/8 minutes and stops at five attempts. Terminal rows carry a two-year retention TTL. Enqueue and delivery can never fail, block or alter a governance transition, and the scheduler report is unchanged. governance_outcomes and contribution_responses stay unwired: the result route is being refactored and the comment-outcome event needs a product decision. * chore(changelog): refresh snapshot for the notification outbox

    78c07c0 ↗
  9. Featuresecurity
    Response headers, hash-based CSP and cross-origin enforcement (#38) (#100)

    * feat(security): add perimeter headers, CSP and cross-site request rule Every response now carries nosniff, a strict referrer policy, frame denial, a minimal Permissions-Policy and a Content Security Policy. HSTS is sent only in production when HTTPS is provable. The policy keeps Astro's build-time script and style hashes and allows only the external hosts the app uses: Cloudflare Turnstile (script, frame, connect) and the first-party Plausible host (script, connect). Inline style attributes are allowed through style-src-attr only, because tally and progress bars use them; script-src has no unsafe-inline and no directive permits unsafe-eval. The service-worker registration was is:inline, which Astro does not hash, so it is now a processed script. Astro's form-post origin check is kept, and allowedDomains trusts the production host over HTTPS so its comparison uses the public origin behind the proxy. The middleware adds what Astro's check deliberately exempts: every state-changing method, JSON bodies, a cross-site Sec-Fetch-Site, an Origin that differs from the trusted public origin, and an absent Origin when a session or dev cookie is present. Bearer cron calls and webhooks carry no cookie and stay allowed. Refs #38 * test(security): verify the CSP and origin rule in a real browser The production build is served with a disposable in-memory database. Chromium checks the home, proposal, sign-in and Sense Box pages for CSP violations, console errors and failed requests; proves the Turnstile script and frame and the Plausible script and event endpoint reach the network layer; asserts the document and JSON header sets; and shows same-origin fetches and native form posts succeed while browser, JSON and cookie-without-Origin state-changing requests are refused. Cloudflare and Plausible are intercepted and answered locally; the script never contacts production. Refs #38 * docs(security): record the perimeter header set, CSP and origin rule Adds docs/security/perimeter.md as the operating contract for headers, CSP sources and the cross-site rule, with the exact values, every external host and its reason, the scoped style-src-attr allowance, verification commands and residual risk. Corrects the pages that said there is no middleware and that a CSP, HSTS, frame or content-type headers are absent, updates the Turnstile and API/authorisation contracts, and records the #38 and I10 state in the programme tracker and known gaps. Remaining work is explicit: proxy headers for static assets and Astro's early 403, a reporting endpoint, CSRF tokens, and production header observation. Refs #38 * chore(changelog): refresh snapshot for the perimeter security slice Refs #38 * docs(security): clarify origin-check exemptions and deployment requirements States the form-like and safe-method exemptions precisely, scopes includeSubDomains to the sending host rather than fusionparty.org.au, and records that production must configure PUBLIC_ORIGIN or BETTER_AUTH_URL or browser writes are refused against the proxy's localhost origin. Refs #38

    0aea7b5 ↗
  10. Featureops
    Durable job records and operational health checks (#39) (#99)

    * feat(ops): record authorised scheduled runs in a durable job ledger Add a job_runs collection with a 90-day TTL on startedAt and a withJobRun helper that records success or failure after the job finishes. A failed ledger write or summariser is logged and never changes the job result or error, so observability cannot break the thing it observes. Wire the governance scheduler (apply and dry-run), the ballot digest endpoint and the membership verification endpoint. Only authorised runs are recorded: 401 and 409 responses are not scheduled runs. Status codes, bodies, secrets, scheduling and governance writes are unchanged. Refs #39 * feat(ops): add exit-coded operational health checks and ops:health Evaluate governance scheduler recency and errors, ballot deadlines that passed without closure, digest cadence and held deliveries, verification recency and due backlog, recent failed or held email, and Turnstile configuration. Every threshold is named in the report and settable by environment variable; checks are count-only and never expose secrets, provider responses, member identifiers or ballot choices. /api/health now publishes coarse governanceScheduler and jobs states. A database failure stays 503, while a degraded job stays 200 so a container restart loop cannot hide a missing external scheduler. npm run ops:health prints JSON (or --human) and exits 0 healthy, 2 degraded or unknown, 1 failing or unreachable, requiring MONGODB_URI. Refs #39 * docs(ops): record job cadence, health command and runbook Document the job_runs ledger, the documented cadence and stale thresholds for each scheduled job, the ops:health command and exit codes, what each degraded state means, the maintainer escalation placeholder and the runbook actions. Record explicitly that production cron wiring and production verification are not done, so #39 remains partial. Update the tracker I10/S8 rows and known gap 21. Refs #39 * chore(changelog): refresh snapshot for the operational observability slice Refs #39 * fix(ops): warn before a scheduled job reaches its fail threshold A 15-minute job judged healthy for 24 hours leaves a full day blind to a complete outage. Each time-based check now has two tiers: degraded past warn (governance scheduler 2h, digest 1h, verification 2h) and failing past fail (26h, 24h, 24h). Within warn stays ok; a missing run stays failing; a failed last run stays failing. Warn and fail are configurable with the existing fail variables plus GOVERNANCE_SCHEDULER_WARN_HOURS, DIGEST_WARN_HOURS and MEMBERSHIP_VERIFICATION_WARN_HOURS. A warn value that is not below fail reports unknown with the conflicting values instead of trusting either. The report's thresholds block names both values and their source. Check ids, report shape, the ledger and route behaviour are unchanged; ops:health still exits 2 degraded and 1 failing. Refs #39 * docs(ops): document two-tier warn and fail job thresholds Show cadence, warn and fail for each scheduled job, explain that warn is a small multiple of cadence (not one missed tick) and why a 24-hour-only alert hid 96 missed 15-minute ticks, and record the invalid-pair behaviour, per-state meanings and escalation timing. Refs #39 * chore(changelog): refresh snapshot for the two-tier thresholds Refs #39 * fix(ops): report a failing job as failing on the health probe * chore(changelog): refresh after rewriting the synthetic token fixture

    23f88d8 ↗
  11. Fixpolicies
    Resolve a branch's public slug for registry addresses (#93)

    Production's Victorian branch predates the standard identifiers and has a UUID, so a policy address derived from the branch ID would be unusable and the import could not target the existing branch without creating a duplicate. - branch records may carry an explicit public slug (vic, nat); - the registry resolves /policies/<slug>/ and import targets by that slug; - ratification writes the branch slug onto new policy records; - the standard branch migration backfills a missing slug without renaming, re-parenting or un-recognising an existing branch; - the import CLI accepts either the branch ID or its public slug.

    20dfa90 ↗
  12. Docsstatus
    Record merged outcome validation and replica-set coverage (#92)

    * docs(status): record merged outcome validation and replica-set governance coverage * chore(changelog): refresh the snapshot after the phase 1 merges

    7e3d243 ↗
  13. Ops & CIplatform
    Branch policy registry import, branch-scoped URLs and post-ratification policy changes (#90)

    * feat(policies): import adopted branch policy with explicit provenance (#89) A branch may already hold policy adopted outside Engage. The import treats that as a provenance operation, not a proposal flow: - reads a branch policy feed and validates every record before writing; - requires an explicit authority basis and fails closed without one; - writes a published, adopted registry record plus an immutable policy_revision holding the exact source document and content hash; - records the source, authority basis, timestamps and provenance lineage; - reports created, unchanged, changed, conflicting, invalid and missing records without overwriting anything; - never republishes a record that was withdrawn, superseded or repealed. Dry-run and re-run are safe: only 'create' entries write, every write is keyed, and a changed source is a review item for the change lifecycle rather than a silent rewrite. * feat(policies): branch-scoped registry and changes to adopted policy (#89, #37) The registry is now navigable by authority and topic, and adopted policy can change through a proposal instead of being frozen at publication. Registry: - policy addresses become /policies/<branch>/<slug>/; internal IDs stay stable and legacy /policies/<id>/ addresses redirect to the canonical path; - the registry collates by adopting branch, then by the branch's own topics, so 41 Victorian policies are browsable rather than one flat list; - each branch has its own registry page with adoption basis, source and current/past tabs; a search and branch filter remain available; - rows show title, two-line summary, topic, branch and adoption origin; - imported records show their authority, import date and source. Post-ratification lifecycle: - a proposal may declare targetPolicyId and amend/replace/repeal; the target is fixed at creation against the exact published revision; - the policy page shows the proposed changes separately and never implies a draft has changed adopted policy; - ratification of a repeal records the deciding proposal; an amendment or replacement supersedes the predecessor only when the successor is published, so the public registry never shows a gap; - imported and Engage-ratified lineage read together in the same history. * chore(changelog): refresh public changelog for policy registry work * fix(policies): clear search and branch filters together in the registry * chore(changelog): include registry filter fix in the snapshot * chore(changelog): refresh snapshot at merge head * fix(policies): use the ballot-scoped result filter in policy detail

    10146b9 ↗
  14. Ops & CIgovernance
    Cover governance writes on a MongoDB replica set (#91)

    * test(governance): cover governance writes on a MongoDB replica set Add replica-set cases for the deletion guard, stage-transition audit events, formal-decision idempotency and conditional-write concurrency. The in-memory database cannot prove transactions, unique indexes or race behaviour, so each case is skipped without VOTING_TEST_MONGODB_URI and drops its own database. Covers known gap 17 (docs/status/known-gaps.md) and RFC 0001 cross-slice risk 4. * test(governance): adapt replica-set coverage to closed-ballot certification #28 requires a closed ballot before a result can be recorded, and checks the recorded result against the votes bound to the ballot and revision. Close the fixtures as the scheduler does and record the zero-vote certifications as explicit overrides, so the atomicity, idempotency and concurrency cases keep testing what they claim. Adds a real-MongoDB case proving an open ballot cannot be certified, that the refusal writes no result, and that certification succeeds after closure with the computed tally stored.

    dd57aa3 ↗
  15. Featureballots
    Validate recorded outcomes against the bound tally (#28) (#86)

    * feat(ballots): validate recorded outcomes against the bound tally Record a formal ballot outcome only after comparing the officer's result with the outcome computed from the votes bound to that ballot and immutable revision (#28). The comparison is deliberately limited to what the decision register settles: Yes greater than No approves and a tie does not (D9); abstentions are recorded and excluded rather than given a denominator (D10, O1); no quorum, turnout or minimum-participation threshold applies (D8). The basis is versioned as `simple-majority-d9-v1`. A contradicting result is refused unless the officer supplies a written reason, and is then stored as an explicit override. The result keeps the tally at certification, the rule basis and the computed result; the `decision.recorded` event records the actor, reason, computed result and recorded result alongside the existing atomic result and ballot certification. Identical retries remain idempotent, conflicting replacements are refused, and historical results are returned unchanged and never rewritten. Both admin result forms now show the computed outcome and its tally before submission and require the override reason when the chosen result contradicts it, using the shared Field, Textarea and Badge primitives. * test(ballots): cover computed outcomes, overrides and stored evidence Add rule-level cases for approval, rejection, a tie, zero votes and abstention-heavy ballots, plus the two admin form behaviours that reveal and require an override reason. Add real-MongoDB replica-set coverage for the parts that prove persistence and the ordered result write: the tally and rule basis stored on the result, rejection of a contradiction without a reason, an audited override, idempotent retries, refused replacement, encrypted-ballot certification through the decryption path, and a historical result that stays readable and unrewritten. The result API is exercised end to end with the dev session. Refs #28. * docs(governance): record computed ballot outcome validation Describe the computed Yes-versus-No check, its `simple-majority-d9-v1` basis, the stored tally and the audited override in the lifecycle, API and agent guides. Mark known gap 10 as partly resolved and keep #28/L1 Partial because the abstention denominator (O1), quorum and ranked choice remain undecided. * chore(changelog): regenerate the public changelog snapshot * feat(ballots): certify only a closed ballot from a consistent bound tally Refuse certification while a ballot can still accept votes. A result is accepted when the ballot has a closure marker, its close time has passed, or the system has already closed it; a live ballot returns BALLOT_NOT_CLOSED and a ballot with no recorded close is refused rather than assumed closed, because a later vote could contradict an early certification. Tally only votes bound to the ballot and exact revision, and treat the rest as a ballot defect instead of ignoring them: unbound or mismatched-revision votes now return BALLOT_TALLY_UNBOUND_VOTES, unreadable encrypted votes return BALLOT_TALLY_UNREADABLE, and missing or invalid decryption keys return BALLOT_DECRYPTION_UNAVAILABLE (503). The tally query reads only the fields the check needs. Reject an override reason longer than 1000 characters instead of truncating audit evidence, and treat a retry that changes the recorded override reason as a conflict rather than an idempotent success. The refusal message now names the computed outcome and says that any other result, including inconclusive, requires a written reason. Refs #28. * feat(admin): show the enforced tally and recorded outcomes Derive the admin outcome basis from the same bound tally that certification enforces, so a page can no longer show a tally the server will not count. A zero-vote ballot reads "No votes yet — outcome not yet computable" instead of "Unsuccessful", and an unbound or unreadable tally is named instead of guessed. An open ballot shows when voting closes instead of an unusable result form; once a result exists both admin surfaces render the recorded outcome, computed result, tally and override reason instead of a re-submittable form. Revealing the override field moves focus to it and announces the requirement to assistive technology. Show overridden outcomes in Ballots & decisions with the reason available, and add the computed result, rule basis and override to the proposal PDF report. Refs #28. * test(ballots): cover closure, the bound set and override integrity Close fixtures exactly as the scheduler does before certifying, and pin the override rule in the two pre-existing suites by asserting the refusal when the reason is removed rather than only supplying one. Add replica-set cases for a live ballot that cannot be certified and the changed closed tally that is then certified, a vote on another revision or with no revision, amendment-ballot votes excluded from the matter tally, an unreadable encrypted vote, missing decryption keys, an over-length override reason and a retry that rewrites the recorded reason. Cover the form focus/announcement behaviour and the PDF computed/override rows. Refs #28. * docs(legal): correct the terms to describe computed ballot outcomes Terms of Use §9 claimed Engage "does not calculate or apply a passing threshold", which is no longer true. Describe the versioned simple-majority-d9-v1 rule, the tie and zero-vote result, the treatment of abstentions, the absence of quorum or turnout, and the explicit, reasoned and audited override. The acceptance gate stays inactive: the document remains owner-authorised with no effective date. The incorrect sentence was in the Terms of Use, not the Privacy Policy, so the Privacy Policy and its version are unchanged. Roll the Terms to version 1.1 and record the correction and the #40 follow-up in the privacy review. Refs #28, #40. * docs(governance): record closed-ballot certification and the bound tally Document that certification requires a closed ballot, that unbound votes and unreadable votes are refused, that inconclusive is always an explicit override, and that amendment endorsement ballots remain officer-supplied because O2/D18 are undecided. Correct the failure table so a zero-vote unsuccessful result needs no override, refresh the tracker, known gaps and handover status, and point the agent guide at the corrected Terms section. Refs #28. * chore(changelog): regenerate the public changelog snapshot * test(ballots): warm the route database before asserting on it The result-API case resolved the application client only inside the route. A transient connect failure could make the development fallback serve the in-memory database, so the route could not see the fixture and the test failed with a confusing authorisation-style error. Resolve the application client in the test and assert the fixture is visible before exercising the route, so a real connectivity failure fails loudly instead of degrading silently. Refs #28. * chore(changelog): record the review fixes in the public snapshot * fix(ballots): judge each ballot's own close time and keep zero-vote outcomes computable Read the addressed ballot's row before the matter so a second, still-open ballot on a closed matter is refused instead of inheriting the matter's closure. The matter fields remain the fallback for legacy ballots with no ballot row. Return the computed outcome for every computable tally, including a zero-vote ballot (still "unsuccessful" under D9), so the UI can require an override instead of silently withholding the reason field. Separate a missing key ring from unreadable votes: the display summary now reports `decryption-unavailable` on its own, with unbound votes stated first because that is the cause an officer can act on. Add a tolerant key loader for read-only paths so a broken key ring no longer fails a page that renders no encrypted votes; signed-in list and detail reads use it, while casting and certification stay strict. The result route now reports a clean BALLOT_DECRYPTION_UNAVAILABLE (503) instead of leaking key-configuration detail. Refs #28. * fix(admin): keep the visible result status and render every tally state The hidden override announcement was the first `[role="status"]` in the result form, so `querySelector('[role="status"]')` returned it and every success or refusal was written to an invisible node. The announcement now uses `aria-live="polite"` without `role="status"`, and both submit handlers target the visible line through `formStatusRegion`, so feedback remains sighted-visible and still announced. Show the computed outcome for a zero-vote ballot instead of claiming it is not computable, which also restores the override field for `Successful` and `Inconclusive`. Add explicit states for unavailable decryption keys and separate unreadable votes, and withhold the form while the tally is defective rather than offering an action the server will refuse. Refs #28. * test(ballots): cover per-ballot closure, zero-vote overrides and the status line Prove an open second ballot on a closed matter is refused while its closed sibling certifies, and that a zero-vote ballot records successful only with a written reason. Pin the tally-state precedence (unbound before unreadable), distinguish missing keys from unreadable votes, and assert display key loading degrades to null instead of throwing. Guard the UI regression: the announcement is not a `[role="status"]`, both pages use `formStatusRegion`, and that helper returns the visible line when the hidden node comes first in the form. Refs #28. * docs(governance): correct the legal pointer and merge wording The privacy review said the Privacy Policy describes the computed rule; the Privacy Policy is deliberately unchanged and the correction is in the Terms of Use. Correct that sentence, rename the lifecycle row so it describes the zero-vote case rather than implying every untallied result needs an override, qualify the display-versus-enforcement claim, and state per-ballot closure. Align the tracker and handover on "integrated, branch only; not merged". Refs #28, #40. * chore(changelog): record the second-pass review fixes * chore(changelog): include the final verification commits * fix(ballots): let display reads degrade instead of failing on unreadable votes Add an opt-in `tolerateUnreadableVotes` read mode to `listProposals` and `getProposalDetail`. Admin pages use it so a broken key ring renders an explicit "decryption unavailable" state instead of returning 500, and affected rows carry `unreadableVoteCount` so the missing votes are counted and shown rather than quietly dropped. Every other read keeps today's loud failure, and certification is untouched. Refs #28. * fix(ballots): key results by ballot, share closure state and reject stray override reasons Add `proposalBallotResultFilter` so the result attached to a matter's primary ballot is addressed by `ballotId` (legacy results without a ballotId still resolve). Apply it to the admin workspace, the proposal PDF, the public proposal and policy pages and the matter read model, so a result on one ballot no longer shadows another. Add `resolveBallotClosure` as the single closure rule used by the server gate and the pages: the addressed ballot's own status/close time first, the matter as the fallback. Add `ballotOutcomeLabel` for consistent title-case rendering and fix the quadratic vote grouping in `readBoundBallotTallies`. Refuse a written `overrideReason` when the result already matches the computed outcome (`RESULT_OVERRIDE_REASON_UNEXPECTED`, 400) instead of accepting it once and then failing an identical retry, so a reason is never silently discarded. Refs #28. * fix(admin): derive the result and closure state from the balloted record Use the shared closure rule on both canvassing surfaces and the oversight page so the form is offered exactly when certification would accept it, including the case where a sibling ballot's close time differs from the matter's. Look up recorded results by the primary ballot, show "N unreadable" when the display tally is partial, and render computed outcomes in title case alongside recorded results. Refs #28. * test(ballots): cover closure precedence, per-ballot results and stray reasons Add pure cases for closure precedence (ballot row before matter) and outcome labels, and replica-set cases proving an unnecessary override reason is refused rather than silently dropped, that display reads tolerate unreadable votes while strict reads still fail, and that primary and sibling results resolve to their own ballots. Refs #28. * docs(legal): scope the outcome rule to ordinary Yes/No ballots Say that the computed simple-majority rule applies to ordinary Yes/No ballots on a matter, and that amendment endorsement ballots follow a separate procedure recorded by an authorised officer. The publication status and the inactive acceptance gate are unchanged; this stays inside the existing unreleased Terms version 1.1. Refs #28, #40. * docs(governance): record stray-reason refusal and display degradation Document that a reason supplied for a matching result is refused rather than dropped, that a broken key ring degrades admin displays to an explicit unavailable state with unreadable votes counted while certification stays strict, and keep the Terms-of-Use pointer and per-ballot closure precedence accurate. Refs #28. * chore(changelog): record the merge and third-pass fixes

    762f76c ↗
  16. Featuredocs
    Check documentation links in CI (#44) (#85)

    * fix(docs): repair broken relative links Point the deployment verification record at the canonical known-gaps page instead of the removed mvp-roadmap, and drop the link to the uncommitted UI-refinement screenshot directory. * docs(guides): point agents at document status labels Replace the stale-page list with a reference to docs/README.md, which defines the document status labels and canonical replacements, and list the new link check among the verification commands. * feat(docs): check documentation links in CI Add a dependency-free script that resolves relative links in docs/, README.md and AGENTS.md, ignoring external, anchor-only, template and fenced-code links. Wire it into the existing application check job as docs:check-links.

    2a52ef4 ↗
  17. Docsplatform
    Reconcile stale historical documentation with the canonical set (#44) (#84)

    * docs(operations): correct removed endpoints, scripts and ballot closure model - Mark the page Superseded and link the canonical build/deploy guide. - Replace the removed /api/ballots check with /api/health and the removed seed-preview, backup-preview and restore-preview instructions with the behaviour that exists (startup seeding, host backup procedure). - Replace the ADR 0003 vote-admission and finalizeBallot description with the implemented deadline check, unique vote indexes and scheduler closure. - Correct the membership audit claim: no memberships.auditHistory or auditVersion exists. - Fix the missing release-gates link and stale preview/cookie statements. * docs(adr): record ballot-admission divergence in ADR 0003 Label the technology decision Current and the admission protocol Design-only, then record the verified implementation: castVote checks the deadline in application code before the transaction, uniqueness comes from the partial vote indexes, and closure writes ballotClosedAt without a tally. Notes that a vote passing the pre-check can commit after the cutoff. * docs(deploy): mark the Coolify deployment record historical Replace the 2026-11-08 cutover banner with a dated historical scope, point to the canonical deployment page, and correct the claim that no CI exists. * docs(engagement): correct the ballot deadline and label the UX record Replace the superseded 24 December 2026 deadline with the approved 30-day ballot period and the 2027-01-14 one-off expiry migration, and describe what the migration actually writes. Mark the dated UX journey record Historical so its old test counts are not read as current. * docs(governance): correct identifiable-ballot boundary and authority fields Identifiable ballots are limited to a national administrator or a holder of the national ballots.view_identifiable permission, not isAdmin alone. Record the ballots.bind and ballots.record_result gates, the current admin navigation, and mark the older governance API page Superseded. * docs(legal): reconcile the 2026-11-08 privacy review with shipped work Label the review Historical and correct the statements overtaken since: Plausible analytics, CRM membership verification, seconding and scheduled ballot closure are implemented, and the legal-acceptance enforcement and ballot privacy notice are applied. Record the delegated identifiable-ballot boundary and define the Current/Historical/Superseded/Design-only vocabulary in the index.

    6fd5562 ↗
  18. Fixballots
    Make the ballot_results index migration preflighted and recoverable (#55) (#83)

    * feat(ballots): make the ballot_results index migration explicit and recoverable Startup no longer creates or drops the ballot_results indexes as a silent side effect. A legacy collection is reported and left untouched; a fresh one still receives the indexes; an already-migrated one is a no-op. `npm run ballots:results-index` adds preflight, dry-run, apply, verify and recovery commands. Apply backs up the index definitions and documents before change, proves the unique partial ballotId index before dropping the legacy unique proposalId index, verifies the final state, and records the actor and backup in data_migrations. Failures are recorded and re-raised instead of being swallowed. Duplicate results are reported for human reconciliation; nothing deletes or rewrites ballot results to make an index fit. Tests: eight replica-set cases cover a fresh install, legacy startup, duplicate blockers, dry run, full apply, partial apply, re-run, loud failure and recovery reporting. The Sprint 1 integrity test now asserts the explicit contract rather than the old startup upgrade. Also records PR #51 as merged to main and the resolved migration risk (#55). Closes #55 * chore(changelog): record the ballot-results index migration * docs(security): record Turnstile as merged to main

    15f7ac5 ↗
  19. Ops & CIplatform
    RFC 0001: Sprint 1 integration, Phase 1 lifecycle, rendering performance and Turnstile (#51)

    * docs(rfc): propose platform evolution and integrity programme * fix(governance): enforce ballot deadlines, rebinding, atomic decisions, and deletion guards (#26, #50) * fix(membership): guard CRM-sourced memberships, exempt national row from conflict, and record manual provenance (#32) * fix(rbac): consolidate permission enforcement, ballot binding gate, and ratification authority checks (#27, #31) * fix(proposals): clear provenance without a conflicting stage update Staff editing a proposal through the admin form always submits provenance: null for the default 'clear provenance' option. saveProposal placed provenance in both $set and $unset, which MongoDB rejects with a path conflict, so every staff edit failed against a real database. Make the clear and set branches mutually exclusive and cover the case against the real MongoDB voting suite. * fix(ballots): keep the deadline banner hydration-stable The ballot deadline rendered a server date and a post-mount relative time in the same text nodes. React 19 reported a text hydration mismatch on every ballot with a deadline, forcing an unnecessary client re-render. Mark the two intentionally time-dependent nodes as hydration-stable and make the date helper's timezone explicit so server and client markup match before the viewer-local deadline replaces it. * test(rbac): reconcile Sprint 1 authority expectations after integration The governance branch made ballots.bind and a future closing date mandatory when entering Decide, and refuses deletion of matters with governance history. The RBAC branch assumed neither. Align the fixtures with real session permissions, supply a ballot deadline, and delete a draft with no history. Ignore branch grants for permissions the catalogue reserves to National scope, allow branch-scoped comment moderation, and prove that a branch proposals.delete grant does not confer destructive authority. * docs(rfc): integrate Sprint 1 and record maintainer decisions Add the canonical governance decision register, the RFC 0001 programme tracker and the Sprint 1 integration report. Update the documentation index and replace the open-question list with the decisions now supplied, while keeping genuinely unresolved questions explicit. Add a browser verification script for the deadline, voting and vote-change journeys and record its evidence. * chore(changelog): refresh snapshot for the Sprint 1 integration * docs(rfc): track active workstreams and new implementation issues Record the Phase 1, rendering-performance and Turnstile workstreams, link the new issues for performance (#52), the command layer (#53), the decision record and responsibility queue (#54), and ballot-results migration safety (#55). Clarify that #36 is deferred rather than blocked inside this programme. * docs(rfc): correct membership workstream status The CRM branch did not add the unique branch-membership index or the duplicate-resolving migration required by #32, so I3 remains partial. * feat(lifecycle): second proposals and schedule advancement and ballot closure Implements the approved lifecycle schedule from the decision register (D3-D7, RFC 0001 Phase 1, refs #26 and #30). - A verified member who is not the author may second a proposal while it is in Propose. The act records `secondedBy`, `secondedAt` and `deliberationEndsAt` (30 days) and writes `proposal.seconded`. It does not change the stage or grant ballot authority. - `src/lib/lifecycle-schedule.ts` is the single source of truth for the 30-day deliberation period, 30-day ballot period and 60-day ceiling. - A system actor (`system:lifecycle-scheduler`) advances due deliberations to Decide, binding the latest immutable revision and setting `ballotClosesAt = secondedAt + 60 days`. It requires no `ballots.bind`; the human early-advancement gate is unchanged. - Advancement fails closed on unresolved amendments (`rejected`, `withdrawn`, `applied`, `not-endorsed` and `inconclusive` are the only non-blocking statuses), on votes bound to other wording, on a missing seconding anchor, and on a ceiling already in the past. - Ballots close automatically at their deadline: `ballot.closed` is recorded once, the stage and result are untouched, and voting is refused after the boundary (D12 is not implemented). - Conditional filters, deterministic event IDs and transactional writes make both operations idempotent and safe under concurrent runs. - An officer opening a ballot without a date now receives the 30-day default; explicit dates remain authoritative. - Adds a read-only report for legacy ballots without deadlines and matters in Deliberate without a deliberation clock. * feat(ops): add governance scheduler and deadline migration report commands - `npm run governance:scheduler` runs the lifecycle scheduler as a dry run by default and writes only with `--apply`. It prints a JSON report with advanced, skipped, closed, blockers and errors, and exits non-zero on errors. - `npm run governance:migration-report` prints the read-only legacy report. - Both require MONGODB_URI and fail loudly without it; neither adds a daemon nor requires production credentials. * docs(lifecycle): document seconding, scheduled transitions and closure Records the implemented behaviour and the assumptions visible for review: - one seconder who is not the author; seconding records the clock but does not change the stage or gate Propose -> Deliberate; - automatic proposal advancement at the deliberation deadline by a system actor, without `ballots.bind`; - the conservative blocking-amendment set, reason codes and failure behaviour; - automatic closure at the ballot deadline without a stage change or result; - the 30-day default for officer-opened ballots; - new proposal fields (`secondedBy`, `secondedAt`, `deliberationEndsAt`, `ballotClosedAt`), deterministic event IDs and scheduler transaction rules; - the read-only migration report and its manual recovery options. * chore(changelog): refresh snapshot for the Phase 1 lifecycle work * docs(lifecycle): state that returning to Propose keeps the seconding clock * chore(changelog): include the lifecycle documentation commits * feat(security): verify Turnstile tokens for unauthenticated actions Add server-side Cloudflare Turnstile verification (D32) and a shared MongoDB fixed-window limiter for the abuse-prone unauthenticated routes. - protect Sense Box submission, magic-link sign-in/first registration, and email sign-up if it is enabled later - fail closed with 503 and an operational error when production requires Turnstile but the secret or site key is missing - report missing, invalid, expired, replayed and malformed tokens with plain-language errors; never log or return the secret or token - store only a keyed hash of the client address, with a TTL index, so limits are shared across instances - leave authenticated voting, deliberation and admin writes untouched - tests cover configuration states, verification outcomes, route refusal and acceptance, real-MongoDB concurrency and the voting exemption * feat(security): show the Turnstile widget on protected forms Render Cloudflare Turnstile on the Sense Box and magic-link sign-in forms using Horizon primitives. The widget renders nothing when no site key is configured, reports load and expiry failures inline with a retry action, and asks for a fresh token after a rejected submission because tokens are single-use. * docs(security): document Turnstile enforcement and rate limits Record the protected actions, configuration contract, fail-closed states, failure messages, privacy boundary, rate-limit defaults and remaining gaps (CSP and headers stay with #38). Add the new keys to the environment example. * chore(changelog): refresh snapshot for Turnstile abuse protection * docs(security): name the rate-limit collection plainly * perf(tooling): add rendering performance harness and DB command metrics Adds an opt-in MongoDB command monitor (disabled unless ENGAGE_DB_COMMAND_MONITOR=1 and APP_MODE is not production), a development-only diagnostics route, and a repeatable Playwright/Mongo measurement harness with baseline and comparison modes. No production behaviour changes. * perf(proposals): batch independent detail reads and defer ballot hydration Runs supersede, eligibility, related-branch and evidence reads with the rest of the proposal-detail batch instead of in sequence. The ballot hydrates on idle rather than blocking load; the stance selector does the same. * perf(auth): resolve a session once per request render Layouts and pages each asked for the same session. Cache the in-flight resolution against the Request object so one browser request performs one session lookup while role revocation remains request-scoped. Adds a regression test for reuse. * perf(lists): project list reads and reuse member vote queries Stops list queries returning detailHtml and, where no search depends on it, long rationale text. Home and the proposals list reuse one member-vote read for outstanding ballots; the member page loads shared activity inputs once instead of twice. Member-page islands in inactive views hydrate only when visible. Adds visibility and vote-reuse regression tests. * perf(admin): consolidate register reads and defer participation panel The proposals register now reads the proposal collection once and batches amendment and revision lookups instead of issuing one query per row. The overview's recent-participation panel moves to a server island with a stable fallback, so its session-dependent reads no longer block the dashboard. Admin timelines hydrate when visible; migrations hydrate on idle. * perf(client): defer notification hydration off the critical path The header notification bell and notification preferences hydrate when the browser is idle. The bell is secondary to page content but still loads its unread count; no API or preference behaviour changes. * docs(status): record the rendering performance audit and measurements Classifies initial, deferred and interaction-only data per audited page; records baseline and after medians, queries removed or deferred, bundle findings, limitations and the highest-value remaining work. Adds a pnpm/npm perf:render entry point. * chore(changelog): refresh snapshot for the rendering performance slice * fix(admin): render saved values in select controls Astro renders React component slot children as raw HTML, so React never sees the options inside NativeSelect and cannot apply defaultValue. Every select rendered its first option, which meant editing a proposal could silently reset its stage, clearing provenance, changing a member's status to pending, or applying the wrong filter or sort. Mark the stored option as selected at each affected call site. The admin proposal editor and register, member administration, Sense Box review, engagement period, policy filters and public proposal filters are covered. * feat(proposals): make seconding the act that opens deliberation D3 requires a seconder before Deliberate and D4 anchors the clock to seconding. The initial Phase 1 implementation recorded the seconding but left Propose -> Deliberate to an officer, which could stall a proposal indefinitely and run the clock in the wrong stage. Seconding now performs the transition and records both the seconding and the stage transition. Officer and API transitions into Deliberate are refused without a recorded seconder. A member-facing control appears on the proposal page for eligible, non-author members, with inline feedback and no raw controls. Update the unrelated stage-transition fixtures to record a seconder explicitly. Extend the browser verification to cover seconding, the 30-day default when no ballot date is given, a rejected past date, and the editor showing the proposal's real stage. * docs(lifecycle): record Phase 1 delivery and the remaining decisions Mark seconding, scheduled advancement and automatic closure as implemented, update the known-gap register, and add O9/O10 for the administrative direct-creation path and renewed seconding after material rewrites. * chore(changelog): refresh after the rendering performance merge * docs(rfc): record Phase 1, rendering performance and Turnstile integration Update I2, I6, I10, I12 and the workstream table with measured evidence and the remaining gaps. Mark the performance and Turnstile documents as merged into the integration branch. * docs(rfc): mark integrated workstreams and the next Phase 2 slices * docs(rfc): add the Phase 2 orchestrator handover brief Record the handover state, governance invariants, traps found during delivery, the recommended Phase 2 sequence, parallelisation rules, verification commands, open decisions and the first ten actions for the next orchestrator. * fix(security,proposals): address PR #51 review findings * chore(deploy): pass Turnstile and rate-limit env vars to app container * fix(governance,security,ui): address CodeRabbit review findings on PR #51 * test(rate-limit): align future window assertions in real MongoDB test

    3b36947 ↗

14 November 2026

2 commits
  1. Docsagents
    Require checking open issues before implementation (#48)
    37aa2f0 ↗
  2. Docsplatform
    Canonical documentation set and known-gap tracking (#46)

    * docs(research): add cross-industry product and UX research Compares Discord, Linear, GitHub, GitLab, Zendesk, Airtable, Notion, Discourse, Stripe, Figma, MediaWiki and Google Docs with Engage. Includes an evidence register, cross-industry synthesis, prioritised backlog, five Horizon UX concepts and an implementation sequence. * chore(changelog): record cross-industry research * fix(api): enforce minimal response DTOs, ballot privacy, and bounded pagination * feat(proposals): separate geographic scope from branch identity Add a canonical proposal scope model with stable keys (national, nsw, vic, ...) and consistent labels from the site's state configuration. Branch records remain the organisational identity; legacy records resolve to the canonical scope without being rewritten. Server validation now rejects display labels, non-string or conflicting scopes and ambiguous duplicate geography, and enforces branch administration independently of the rendered controls. * feat(proposals): use an accessible scope selector Replace the native proposal-scope dropdown with the existing ToggleGroup primitive, giving a single National option, consistently named states and territories, visible focus, keyboard navigation and responsive wrapping. Default to the member's authorised branch where one applies and submit the canonical scope key rather than a display label. * chore(changelog): refresh snapshot after proposal scope changes * fix(security): harden RBAC boundaries, CSRF origin checks, and markdown links * feat(ballots): add AES-256-GCM encrypted vote storage, blind indexing, and migration * refactor(auth): unify legacy administrative permission resolution * chore(changelog): record permission resolution consolidation * fix(security): handle rotated blind-index upserts and proxy-safe CSRF origins * feat(site): add branded 403, 404 and 500 error pages * chore(changelog): refresh snapshot after status pages * feat(auth): separate participation, voting and administration Decouple proposal destinations from branch administration. Any verified member may submit to National, any state or territory, or any recognised local branch. Submission creates no membership, voting eligibility, or administrative authority; governance authority remains restricted. Replace the destination selector's administrative filtering with a canonical list of all recognised destinations. National and the eight states/territories stay primary; local branches are revealed behind a disclosure and the member's own branch is preselected. Align Member Management with the capability model: member directory, verification, and role changes use members.view, members.verify, and roles.manage. Canonical system role names are shared, delegated branch and custom roles are visible on each member, and anti-escalation blocks delegated managers from granting or altering national administrators. Document the target authorisation model and remaining migration work. * chore(changelog): record authorisation consolidation * test(ci): update member lifecycle browser check for unified notification center * feat(site): open notifications in a header popover The notification bell now shows recent updates in place, with unread count, mark all read, and a link to full notification settings. The bell stays visible on mobile instead of living inside the collapsible menu. * chore(changelog): refresh snapshot after notification popover * fix(security): allow national RBAC grants in branch search and preserve scope on read * feat(auth): support multiple roles and a grouped scope select Allow members to hold several platform system roles at once. Member Management now uses checkboxes for Member, Moderator, and National Administrator; roles are replaced as a set, effective permissions remain a union, and removing one role does not revoke another. Session and member DTOs expose the full role list while the legacy single role remains the highest-precedence value. Replace the nine-option destination radio group with a grouped, type-ahead Select built from the design-system primitive. National and the states/territories form the primary group; local branches are grouped separately. The control stays compact, keyboard accessible, and mobile friendly without exposing nine chips. * chore(changelog): record multi-role and grouped scope select * feat(verification): verify members from Underground CRM * chore(changelog): record CRM membership verification * docs: establish canonical product, domain and architecture documentation * chore(changelog): record documentation sprint * docs(status): link known gaps to GitHub issues * chore(changelog): record known-gap tracking * chore(changelog): refresh snapshot before merge

    52ffaf6 ↗

13 November 2026

19 commits
  1. Fixballots
    Show single relative ballot deadline in viewer's local timezone (#47)
    db6d4b8 ↗
  2. Fixballots
    Look up encrypted votes by blind index in member queues and activity (#45)
    14ae304 ↗
  3. Docsresearch
    Cross-industry product and UX research (#25)

    * docs(research): add cross-industry product and UX research Compares Discord, Linear, GitHub, GitLab, Zendesk, Airtable, Notion, Discourse, Stripe, Figma, MediaWiki and Google Docs with Engage. Includes an evidence register, cross-industry synthesis, prioritised backlog, five Horizon UX concepts and an implementation sequence. * chore(changelog): record cross-industry research * fix(api): enforce minimal response DTOs, ballot privacy, and bounded pagination * feat(proposals): separate geographic scope from branch identity Add a canonical proposal scope model with stable keys (national, nsw, vic, ...) and consistent labels from the site's state configuration. Branch records remain the organisational identity; legacy records resolve to the canonical scope without being rewritten. Server validation now rejects display labels, non-string or conflicting scopes and ambiguous duplicate geography, and enforces branch administration independently of the rendered controls. * feat(proposals): use an accessible scope selector Replace the native proposal-scope dropdown with the existing ToggleGroup primitive, giving a single National option, consistently named states and territories, visible focus, keyboard navigation and responsive wrapping. Default to the member's authorised branch where one applies and submit the canonical scope key rather than a display label. * chore(changelog): refresh snapshot after proposal scope changes * fix(security): harden RBAC boundaries, CSRF origin checks, and markdown links * feat(ballots): add AES-256-GCM encrypted vote storage, blind indexing, and migration * refactor(auth): unify legacy administrative permission resolution * chore(changelog): record permission resolution consolidation * fix(security): handle rotated blind-index upserts and proxy-safe CSRF origins * feat(site): add branded 403, 404 and 500 error pages * chore(changelog): refresh snapshot after status pages * feat(auth): separate participation, voting and administration Decouple proposal destinations from branch administration. Any verified member may submit to National, any state or territory, or any recognised local branch. Submission creates no membership, voting eligibility, or administrative authority; governance authority remains restricted. Replace the destination selector's administrative filtering with a canonical list of all recognised destinations. National and the eight states/territories stay primary; local branches are revealed behind a disclosure and the member's own branch is preselected. Align Member Management with the capability model: member directory, verification, and role changes use members.view, members.verify, and roles.manage. Canonical system role names are shared, delegated branch and custom roles are visible on each member, and anti-escalation blocks delegated managers from granting or altering national administrators. Document the target authorisation model and remaining migration work. * chore(changelog): record authorisation consolidation * test(ci): update member lifecycle browser check for unified notification center * feat(site): open notifications in a header popover The notification bell now shows recent updates in place, with unread count, mark all read, and a link to full notification settings. The bell stays visible on mobile instead of living inside the collapsible menu. * chore(changelog): refresh snapshot after notification popover * fix(security): allow national RBAC grants in branch search and preserve scope on read * feat(auth): support multiple roles and a grouped scope select Allow members to hold several platform system roles at once. Member Management now uses checkboxes for Member, Moderator, and National Administrator; roles are replaced as a set, effective permissions remain a union, and removing one role does not revoke another. Session and member DTOs expose the full role list while the legacy single role remains the highest-precedence value. Replace the nine-option destination radio group with a grouped, type-ahead Select built from the design-system primitive. National and the states/territories form the primary group; local branches are grouped separately. The control stays compact, keyboard accessible, and mobile friendly without exposing nine chips. * chore(changelog): record multi-role and grouped scope select

    32edbcc ↗
  4. Fixbranding
    Remove internal Horizon label from public and verification emails (#24)

    * fix(branding): remove internal Horizon label from public and verification emails * chore(changelog): update changelog snapshot

    787160a ↗
  5. Ops & CIplatform
    Governance transparency, extensibility hardening, notifications, PWA & Web Push (#23)

    * docs(governance): specify historical access, reporting privacy, and AI briefing design * feat(governance): add evidence-backed contribution outcomes and historical safety checks * fix(reporting): enforce branch admin scope and add PDF confidentiality disclosures * chore(changelog): record governance transparency sprint * docs(rbac): document RBAC audit, permission matrix, and configurable roles spec * fix(security): enforce archived proposal review permission on GET /api/amendments * feat(rbac): add configurable scoped roles, permission evaluation, and admin UI * chore(changelog): record RBAC audit and configurable roles * fix(governance): exclude governance resolutions from policy ratification and publication workflows * docs(governance): document safe policy registry reconciliation for misclassified resolutions * chore(changelog): record governance resolution classification fix * feat(ballots): add 14 Jan 2027 open ballot expiry migration and prominent deadline display * feat(governance): add extensible matter registry and type-aware lifecycle validation * feat(governance): decouple ballot/decision records and add provenance relationship validation * fix(security): enforce scoped RBAC permissions across admin API endpoints * feat(architecture): add integration seams, authorised read models, resilience helpers, and indexes * chore(changelog): record extensibility sprint and ballot expiry migration * feat(email): add responsive Horizon email templates for all lifecycle notifications * feat(email): add explicit approval-gated batch re-engagement workflow * feat(pwa): add installable Engage manifest, Horizon icons, and safe service worker * fix(pwa): generate app icons from Horizon SVG logo * feat(notifications): add self-hosted VAPID Web Push, in-app inbox, and unified preferences * feat(member): add unified NotificationCenter UI for inbox, email, and push * test(notifications): add notification/PWA tests, preview script, and docs * chore(changelog): update changelog snapshot * fix(deploy): stop repeated Coolify deployments after health failures * chore(changelog): record Coolify deployment fix

    baae42d ↗
  6. Ops & CIplatform
    Feat/usability governance sprint (#22)

    * feat(admin): redesign navigation, overview, ballots and reporting IA * feat(admin): overhaul proposal workspace with progressive disclosure and feedback * feat(reports): add on-demand proposal PDF report generation * test(admin): add proposal PDF tests, CSV scope fix and changelog * docs(agents): enforce shadcn primitive usage * refactor(ui): migrate custom controls to shadcn primitives * chore(changelog): record shadcn primitive migration

    b271a70 ↗
  7. Featureplatform
    Usability, governance lifecycle, contributor feedback & admin reporting (#20)

    * feat(platform): redirect reclaim.fusionparty.org.au to Engage The Reclaim policy site is retired. A Worker bound to the reclaim custom domain now answers every request with a 301 to the same path on engage.fusionparty.org.au, preserving query strings so Engage's existing legacy redirects (pending-vote, all-policies, reclaim-our-*) still resolve. The previous reclaim Worker is left deployed for rollback. * chore(changelog): record Reclaim domain redirect * feat(platform): map Reclaim division paths to Engage proposals Old links to /reclaim-our-economy/<proposal>/ and /reclaim-our-future/<proposal>/ now land on /proposals/<proposal>/ instead of a 404 on Engage. Retired section index pages, whose names are not proposal slugs, resolve to the proposal list. Other paths and query strings are unchanged. * chore(changelog): record Reclaim path mapping * feat(discovery): surface Sense Box and next actions when caught up on ballots * feat(policies): link empty policy registry directly to fusionparty.org.au/policy * feat(governance): add contributor feedback, proposal supersession, and resolution lifecycle support * feat(admin): add ballot progress, branch summary, and privacy-preserving CSV export * chore(changelog): record usability, governance and reporting updates * fix(governance): address review findings and add Reddit-style comment composer * chore(changelog): record review fixes and comment composer update * feat(notifications): surface contribution responses and catch-up alerts in header and My Engage * chore(changelog): record in-app notifications update * fix(governance): address PR #20 CodeRabbit review comments * chore(changelog): record PR #20 review fixes * docs(research): compare participatory governance patterns with Engage * docs(research): record verification and refresh changelog * fix(governance): address PR #20 review findings * chore(changelog): update snapshot after main merge * docs(research): validate governance patterns with REA runtime evidence * chore(changelog): record REA governance research

    94c0caa ↗
  8. Ops & CIchangelog
    Record GitHub protection defaults (#19)
    b8af56b ↗
  9. Ops & CIrepo
    Add CODEOWNERS for default review routing (#18)

    Every path defaults to @finneh4249 so pull requests are routed to a single accountable reviewer. Ownership is advisory only: the main ruleset keeps a one-approval requirement for all contributors.

    041c469 ↗
  10. Ops & CIchangelog
    Record Sense Box destination picker
    430bec4 ↗
  11. Featuresense-box
    Offer accessible geographic destination picker
    5549e0c ↗
  12. Ops & CIchangelog
    Record branch identity repair
    63e0a28 ↗
  13. Fixbranches
    Reuse existing identities and accept national concerns
    2a7452a ↗
  14. Ops & CIchangelog
    Record self-service branch membership
    123606c ↗
  15. Featurebranches
    Let verified members manage branch membership
    e839386 ↗
  16. Ops & CIchangelog
    Record Sense Box availability fix
    e22aa5e ↗
  17. Fixsense-box
    Accept local concerns before branch setup
    7efcbbb ↗
  18. Ops & CIchangelog
    Record Sense Box release
    f2b384d ↗
  19. Featuresense-box
    Collect private branch community priorities
    8ec0cf1 ↗

9 November 2026

18 commits
  1. Ops & CIproposals
    Capture approved desktop and mobile journeys
    9ef66f5 ↗
  2. Featureproposals
    Implement approved reading and voting journey
    b5207f2 ↗
  3. Docsproposals
    Record approved design reset and requirements audit
    41b4682 ↗
  4. Ops & CIchangelog
    Include voting status safeguard
    99a9ea0 ↗
  5. Fixvoting
    Refresh proposal hero after saving a vote
    7560540 ↗
  6. Ops & CIchangelog
    Record proposal participation redesign
    a17770f ↗
  7. Featureproposals
    Connect policy reading with voting and simplify discovery
    fc8d130 ↗
  8. Ops & CIchangelog
    Record proposal experience changes
    dede16c ↗
  9. Featureproposals
    Simplify discovery and expose ballot progression
    1c13678 ↗
  10. Ops & CIagents.md
    Enhance AGENTS.md with more bounded structure for Coding agents working on the repository
    50a7710 ↗
  11. Ops & CIchangelog
    Record audited platform settings
    d619b8f ↗
  12. Featureadmin
    Add audited platform settings and branch hierarchy validation

    Replace the raw JSON platform settings form with a task-based settings workspace. Administrators can manage visibility, public features, social channels and the branch website directory, with server-side URL validation, read-only infrastructure notes and a recorded change history that supports restoring earlier values. Enforce branch parent kinds on the server so states and territories sit under National and local branches sit under a state or territory. Add coverage for the settings API, audit history, restore behaviour and branch hierarchy rules.

    5bb7e82 ↗
  13. Ops & CIchangelog
    Record durable migrations and branch seed
    b808f0b ↗
  14. Featureadmin
    Add durable database migrations and standard branch seed

    Add Admin -> Migrations for national administrators. The page previews each additive migration, shows the last recorded run and any error, and applies Standard branches or Branch participation individually or in order. Every run is recorded in data_migrations with run count, timestamps, actor and result. Standard branches is an idempotent seed for Fusion National, VIC, NSW, QLD, WA, SA, TAS, ACT and NT with National as parent; existing branches are never renamed, re-parented or un-recognised. Branch participation remains blocked until the National branch exists. The command-line seed now uses the same service, and the participation migration remains available for deployment automation.

    e2137a5 ↗
  15. Ops & CIchangelog
    Record branch participation and verification
    b980369 ↗
  16. Featurebranches
    Separate branch following from verified membership

    Members choose the branches they follow during onboarding and in My Engage. Authorised administrators verify followers as members in a focused Branch governance workspace. Branch subscriptions are now Engage-owned preferences, while verified organisational membership stays in branch_memberships with source, verification and audit metadata. National governance is included for every verified account and never removed by branch preferences. Existing members without branch connections receive national scope silently and a one-time state branch invitation. Eligibility is decided in one service used by proposal pages, ballot submission, pending-vote promotion and digests. Followers can discover branch activity but cannot vote. Revocation requires a reason and preserves historical votes and the person's following preference. The migration backfills legacy membership metadata, adds subscriptions without duplicating them, assigns open proposals without branch context to national governance, and leaves branch-owned and archived records untouched. The Underground CRM boundary is implemented through applyExternalMembership: external membership facts can update organisational membership but never branch subscriptions, and local administrators cannot silently override CRM-sourced records. Tests cover national defaults, follow/unfollow idempotency, source integrity, permissions, migration, parent/child eligibility and new proposal defaults.

    a727732 ↗
  17. Ops & CIchangelog
    Record the member engagement admin repair
    ba482d0 ↗
  18. Fixengagement
    Repair proxy test sends and clarify admin delivery reporting

    Use JSON and the configured public origin to prevent the reverse proxy from rejecting admin test email before provider submission. Separate explicit provider rejection from uncertain sends, expose safe self-only receipts, and keep test bounces isolated from member preferences. Replace raw engagement reporting with responsive cards, period controls, a read-only audience preview and expandable diagnostics. Historical ballot opportunity coverage remains explicitly unavailable. Validation: 144 tests passed, 15 optional tests skipped; Astro check and build passed; mocked-provider HTTP and DOM interaction checks passed. Browser screenshots and authenticated production delivery remain blocked and are documented.

    34166c8 ↗