Commit Graph
395 Commits
Author SHA1 Message Date
Bendik Aagaard Lynghaug f0c43c5c0f Docs: both hosts deploy from CI; the site table reads v0.5.2
Test / test (push) Failing after 1m7s
2026-09-28 18:26:31 +02:00
portal release f2ca00b309 Match portal v0.5.2 2026-09-28 18:11:49 +02:00
Bendik Aagaard Lynghaug 45240b7cab Release 0.5.2
Test / test (push) Successful in 57s
Publish release / publish (push) Successful in 3m1s
v0.5.2
2026-09-28 18:09:28 +02:00
portal release ac4af4395a Match portal v0.5.1 2026-09-28 17:51:11 +02:00
Bendik Aagaard Lynghaug 6ee6551400 Release 0.5.1
Test / test (push) Successful in 58s
Publish release / publish (push) Successful in 3m2s
v0.5.1
2026-09-28 17:48:37 +02:00
portal release 1e7245b062 Match portal v0.5.0 2026-09-28 16:50:47 +02:00
Bendik Aagaard Lynghaug 68471969b5 Release 0.5.0
Test / test (push) Successful in 1m0s
Publish release / publish (push) Successful in 6m47s
v0.5.0
2026-09-28 16:46:50 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 214d4eb85c Sessions outlive the deploy that interrupted them
Test / test (push) Successful in 58s
A MemoryStore meant every restart signed out every desk on the site
being deployed. Bearable while a desk is three people, and not the
kind of thing that gets better on its own.

They live in NATS KV now: the JetStream already under the events, the
projections, the content reload and the access questions. No new
service, no new store, and the same bucket a second instance of a site
would read if there ever is one. `create` draws a fresh id rather than
writing over a session already at that key, the bucket's `max_age`
collects what nobody comes back for, and a record's own expiry is what
answers a load, whatever the bucket still holds.

Proved the only way it can be: a store opened twice against one
JetStream, which is what two runs of the binary are.

Also fixed, while there: the integration test asserted a record's
projected state was one that `aggregates::transition` never writes -
it appends events, the desk handler updates the projection - so it
failed whenever it was actually run. It now asserts what it says it
does, that a mailed reply leaves the state alone. test.yml has been
red since 0.3.47 while publish.yml stayed green, which is how v0.4.0
went out over it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-28 16:38:05 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 d5de25e8c6 A file can come back out, and a script cannot come back forever
Two halves of the same evening.

Uploads were one-way. A `type: file` field put an object in the bucket
and wrote its key into the record, and nothing ever read it back - a
desk showed `0aba5734-...-drawing.pdf` as a string with no link, so a
builder could receive drawings and never open one.
`GET /attachment/{bucket}/{record}/{field}` streams it. The key is not
the credential and is not taken from the caller: it is read out of the
record named, so a file is reachable only through a record somebody is
allowed to see, and a key that leaks off a desk is a link to nothing.

And there was no rate limiting anywhere. A burst of 30 per caller IP,
refilled one every two seconds, outside the session layer so anyone
over it is turned away before a handler is entered. Well above a
person filling in a form - a page load fetches several resources at
once - and well below being a nuisance. PORTAL_RATE_BURST and
PORTAL_RATE_SECONDS retune it; either 0 turns it off for an instance
behind something that already does this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-28 16:28:43 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 8d6f29011c An upload asks the policy, like every other way in
/upload asked nothing. It took a file, capped it at 20 MB, and wrote
it to the bucket for whoever sent it - no session, no page, no policy.
It was the one server entry point that did not ask the question every
other one asks, and on a site whose forms are public that makes the
route public too: a free disk for anyone who finds the host.

Harmless while no instance had storage configured, which is why it sat
there. kasse now has a garage wired to klingenberg's portal, so it is
not harmless any more.

An upload now carries the question and the alternative the file is
being attached to. The page has to exist, the alternative has to be
open and to actually declare a `type: file` field, and the policy has
to allow Submit on that page for whoever is asking - checked after the
bytes are read and before any of them are written.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-28 16:08:12 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 9891c462c6 A page says nothing until it has something to say
The Suspense fallback on a question is the whole served page until
the question resolves - no header, no wordmark - so the word
"loading…" was the first and only thing a visitor or a crawler read
about the site. True, and not about them. It holds its space and
stays quiet now; `aria-busy` says what is happening to a reader that
would otherwise find an empty document. Same for the two resource
slots inside a page, which keep a line's worth of room.

Also gone: the `gitea_org_repos` resource kind, which no site ever
named. `gitea_starred` and `gitea_releases` stay.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 13:25:11 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 040a95ee07 A submitter's own moves say where they may be made from
portal compiles one access rule per state a self_transition names, and
without them assumed the day the case arrived. The builder already
knew the answer - `moves_of(need, SUBMITTER)` carries the from-state
of every move - and now writes it down, so the applicant answering a
request for papers from `incomplete` gets a rule for it, and withdrawal
is offered from wherever the case has got to.

Measured on the building authority: the submitter had two rules, both
out of `open`. It now has ten, across applications and appeals.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 21:35:32 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 f18d1a5181 A person stays in dialogue with their case
Five things a building authority needed and portal could not say,
found by building one and replaying its cases through the engine.

The one that mattered: a submitter could only ever act on a record
nobody had touched. `access.rs` pinned a self_transition's from-state
to `open`, though the runtime had always passed the real state and
asked. So the applicant written to for a missing drawing could not
send it, and nobody could withdraw once anything had happened.
`self_transition` now takes `from: [state, ...]` and compiles one rule
per state; omitted it still means the initial state alone, which is
what every unsubscribe link already meant.

Then the four beside it. A record can belong to another record
(`type: record`, `of:`), with `where: { field, equals }` on a listing
as the other half, so an application's page lists the objections that
name it. A public view can be narrowed to the states worth showing,
so a register that is public by law is public about what was decided
and not about what was withdrawn. A state can grant a group, so an
approval that means membership needs no second step. And a state can
be moved by a clock (`after: { days, to }`, src/deadlines.rs) - held
to the same declared edge as a desk button, firing the same mail,
publishing the same event.

Also: the README is a README again, and everything that was crowding
it is in docs/ - architecture, content reference, state machines,
access, operations.

95 tests, up from 82.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 21:35:25 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 3e1c299490 A door costs the person who was going to pick correctly
Three seeds over the building authority's front door, then three more
over a variant where the two bare needs became doors of their own.

The diagnosis held: six of the eight front-door misroutes went to the
appeal, a concrete sentence standing among abstract categories, which
collected everyone with any sort of grievance whatever it was about.
Behind a door of its own it collected none.

The site got no better for it - 77.3% against 80.0%, inside the spread.
Two offers went from findable to hidden: the firm whose insurance
certificate had lapsed found "to be on the list, and then to file
without asking again" as a sentence on the front door, and fails every
seed once it is behind a door called "Work as a firm".

So the leak was not costing what it looked like it was costing, and the
rewrite is rejected on measurement. The mixed front door stays.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 20:25:25 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 d2aae383b2 A case can be sent back, and can end well partway along
A municipal building authority is the first sector that the line a
case walks could not describe. An application is returned for the
drawing it was missing and walks the same stretch again; an appeal
ends the moment the authority changes its own decision, without ever
reaching the board; an applicant may withdraw from anywhere, while a
refusal may only come once the papers are in.

`reached_from: { <stage>: [<stage>, ...] }` says where a stage is
entered from when the line does not. A stage named there is entered
from exactly those stages and nowhere else, so saying where a refusal
may come from also says where it may not - which `turned_down_from`
could not, being one list for every bad ending at once.

Found by replaying fifteen real building cases through portal's own
engine against a throwaway JetStream: it refused three legal paths and
accepted two illegal ones. Portal needed no change - hand-writing the
correct graph into aggregates.yaml, cycle and all, was accepted and
enforced exactly. The rebuilt site now produces that same graph from
the plan, and the access policy follows it.

Also: a public view is of a bucket, not of a need. A permit register
holds the owner's small application and the approved firm's large one
and is one page either way; the rule refused to publish a bucket the
moment any role filed into it. A bucket only a role ever writes to is
still refused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 20:17:06 +02:00
portal release a847d0defa Match portal v0.4.0 2026-09-24 21:37:28 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 443ddcca68 A plan may ask for a place
`type: location` on a field is portal 0.4.0's map pin, stored as
lat/lon/zoom. The reference tells the model it needs `optional: true`,
since a map needs a browser that can draw one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 21:35:45 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 26c1762dfa A reply to a case mail becomes a note on its record
Test / test (push) Failing after 53s
Publish release / publish (push) Successful in 3m14s
Whatever reads the mailbox publishes on portal.mail.received; portal
appends the note after checking the record exists in a bucket this
site has and the sender is the address the record itself holds. A
note never moves a case: a mailbox is the one door anyone may knock
on, so it cannot drive a state machine even if someone forges their
way past the checks. The desks show the conversation beside the case.

Tested: the address parser, every refusal (a stranger, no address to
compare, an empty reply, the same reply twice, an unknown contract),
and the whole path through a real JetStream - the note lands, the
state does not move, and no event is written.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
v0.4.0
2026-09-24 21:26:57 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 4fd60293fa A field can be a place, and a question can be about one
`type: location` puts a pin on a map and stores {lat, lon, zoom}; a
record that holds one renders as a still, on a desk and in any
resource card. `place:` on a question is the counterpart to `event:`:
event makes a page an occasion with a time, place makes it somewhere,
shows the map under the question, and opens any location field on the
page there instead of on the globe.

Every tile and every still is fetched by portal and served from this
origin (src/maps.rs, MapLibre vendored in public/), so a page with a
map on it still talks to nobody but us: no third-party request, no
consent banner, and the token never leaves the server. MAPBOX_TOKEN
unset turns the whole thing off, the way GARAGE_* does for uploads.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 21:17:28 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 242a1e0ad6 The keys come out in the order they were written
A page is read by the people who own it, and serde_json sorts keys, so
every file put `name` at the bottom under `action` and `consequence`.
With preserve_order the file reads the way it was built: name, then
description, then what the card does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 20:44:37 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 1ed33b6160 build: a card states what the reader must already have
`requires:` on a need is one sentence naming what the person must
have or be for the alternative to work - a membership, a reference
number, the link from a mail. It renders as the card's first feature,
above the road, who-reads-it and the form, because a condition a
reader meets only after filling the form in has already cost them the
filling in. Whether the section exists is read from the plan, never
from its wording: under a lift every slot holds a token and a token is
never empty, which would conjure a section the live page lacks and
shift every feature after it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 20:42:41 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 743f4a8563 build: every feature says something; a lift carries words, not absences
Five features were emitted empty, as layout: a door's strip, a desk's
list, an invited list, a public list, an invite form. Each now has a
title and a line that says what a row is and what the buttons under it
do, or what the list leaves out - true from the plan before a model
writes a word, and a slot the model can improve. Desk cards, their
links and the desk page itself get real fallbacks too. The lift no
longer copies an empty live string over a fallback, which would have
emptied every new slot on the next rebuild.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 20:40:03 +02:00
Bendik Aagaard LynghaugandClaude Opus 5 c6d0701639 build: the mail cleanup runs on the final words, not only a model's reply
A stray placeholder or a lost link was only fixed when a model wrote
the mail, so a words file that already carried one kept it through
every later build. The pass now runs once on the finished
aggregates.yaml words, covering --words, --words-from and the model
alike; the football club's three mails lose the `{chain}` they were
shipped with.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 20:28:27 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 0a02b4db1a build: a bare {chain} in a mail body goes, on its own line or inline
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 09:33:21 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 88e54ed17f runs: the club's short mails, as actually written
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 09:01:11 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 f516e26926 build: a mail is at most three short sentences and the link line
The mail prompt said "short"; it now says how short. The football
club's enrolment mails halved in length and read easier, and the
vel's evened out, with every link kept.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 09:00:15 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 6f2f7e271c runs: the football club with a sender, stage words and mails
The second Norwegian case: level with its earlier build on routing
inside the spread, desks 13 of 14 with outcomes in words, Norwegian
mails from Sonnet in one pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 08:28:26 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 1df710f32f runs: the friendliness judge passes a positive control
Live vel front door against a cold, bureaucratic twin: friendlier 9
of 10 to the live page, none to the twin, both orders. So the earlier
no-preference between the live doors and the rejected rewrite was a
verdict, not blindness; and judged clarity and measured routing are
different things.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 07:50:52 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 fd785288a4 runs: the rejected vel doors read clearer and route worse
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 07:15:58 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 4d22f4cb44 plan: a spectator role goes back to the model once; bare-word movers and unlabelled groups parse
Re-planning the contractor showed three wasted rounds: `moves_by: {
checking: submitter }` written as a bare word, a group without a
label, and the two featured owner roles left with nothing to play,
which the builder only warned about after the fact. The bare word and
the missing label now parse (a label defaults to the id), and a plan
that parses with spectator roles is sent back once with the finding;
on the contractor, round three fixed both.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 06:42:05 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 6e49694211 build: turned_down_from, and uhhm's stages in words
A need may say which unfinished stages a case can still be turned
down from; the machine no longer offers the bad end from every stage.
uhhm's collaborators are declined before they start and depart after,
as the live site has it. The uhhm plan gets stages_text and three
desk buttons reworded: every uhhm desk scores full marks.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 06:01:56 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 aeff4c8cbe CI: lint with iris v0.3.47
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 05:23:48 +02:00
portal release 57b733e606 Match portal v0.3.47 2026-09-24 05:20:11 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 9ed8194484 Release 0.3.47
Test / test (push) Failing after 55s
Publish release / publish (push) Successful in 3m48s
iris learns stage_words; portal unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
v0.3.47
2026-09-24 05:17:45 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 be14e33603 build: stages in the plan's own words
`stages_text` on a need gives each stage plain words in the plan's
language. The fallback mails, the road line and the desk buttons use
them, and needs.yaml carries them as `stage_words` so the desk score
describes an outcome the way the site would. The vel's plan has them;
its desks score 26 of 26 where the id-based outcome scored 24.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 05:17:18 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 3923d4d0dc needs: stage_words, each state in the site's own words, carried into the simulation model
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 05:17:11 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 8e6a93ebb7 rate: a desk row offers only the buttons that start from its state
The first desk score offered every button of the bucket, where portal
shows a row only the moves from its own state; that scored the live
vel 17 of 26 and sent a rewrite of the neighbour-help desk chasing an
instrument fault. With the row's buttons only: 24 of 26, and the
rewrite loses on the fair test too. Noted: an accent-stripped state id
(ikke_lost) reads as English even to a strong picker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 04:39:13 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 9089503524 rate: the desks are scored on their buttons
The inside of the business reads button labels and nothing else. For
every desk and bucket with two or more buttons, a worker is told what
just happened to a case, in the state's own words, and picks the
button; scored right of total with what each miss was taken for. The
vel's neighbour-help desk scores 2 of 4 and the notice board 1 of 2:
the first numbers a desk has ever had.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 03:44:52 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 5e313b7d40 runs: the planned contractor rated
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 03:05:00 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 2622fdac88 plan: a budget that equals the form is reported as counted, not decided
Four of the planned contractor's five needs had max_fields equal to
their required fields: the model counted the form and called it the
person's tolerance. `plan` now says so when most needs do, and the
reference tells the model to decide the number before writing the
form.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 03:04:22 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 d132f1e4df runs: the contractor planned end to end, 7 of 8 across seeds
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 02:32:30 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 209e9d1258 plan: held-out personas are mapped to the plan's needs by a model, ids only
The one manual step left after `plan` was mapping the attached
personas' `need:` to whatever ids the model chose. A second call now
does it: the model sees the plan's needs and the persona texts and
returns ids only, after the plan is final, so no persona wording can
reach a page. An id the plan lacks is ignored and the reader is told.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 02:27:38 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 b1f0210691 build: personas naming undeclared needs is the reader's mapping, not a builder bug
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 01:55:39 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 20e5e16641 plan: the model that writes a plan learns this week's keys
`does`, `shows`, `mail`, `mails`, `invites_by`, `events`,
`attended_by`, and the measured guidance on doors: the plan reference
the model reads lagged the builder by a week, so a planned site had no
opener, no mails and no onboarding.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 01:54:02 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 42059da48f CI: the tests, and every plan built and linted
The trainer had no CI. Every push now runs the tests and builds every
plan under plans/ against the iris release the live sites run, and
lints the onboarding site.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 01:16:35 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 07da3b40f7 Docs: the skill file says what the trainer does now
iris instead of question_lint everywhere; the skill's procedure is
plan, build, score: the opener and the look-around, mails and the
sender, moves for the person, doors only when measured, the lift
through a rebuild, the language and link guards, the descriptions
score over the headings score, and the spread a change has to beat.
README documents --llm-for.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 00:45:16 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 deee27d280 runs: the vel doors reworded by a model, worse across three seeds, rejected
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 00:12:57 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 8c7fb870bf build: a reply in the wrong language keeps the words it had; the vel's mails
A model asked for Norwegian sometimes answers in English. The commonest
function words of each language are counted across a reply, and one
that reads as the other language is refused with a line saying so.
Tomter Vel's six mails, worded by Sonnet in Norwegian, are round 2 of
runs/tomtervel-opener-2026-09-23 and live.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-23 23:35:32 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 72a081ed59 build: a model may not lose the submitter's link; uhhm round 7, the mails
Sonnet wrote the ten uhhm mails and replaced the decide link with a
bare {chain}. keep_links puts the fallback's link line back into any
mail that lost it. The mails read easier than the fallbacks (LIX 9 to
33 against 18 to 28) and say something.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-23 23:02:48 +02:00
Bendik Aagaard LynghaugandClaude Fable 5.1 b5f5c46ff2 build --llm-for <prefix>, and rate reads the mails
The words model can be pointed at a subset of pages (`aggregates.yaml`
for the mails alone) while everything else keeps the words it has.
`rate --repo` rates each mail's prose on its own, LIX and length,
since a person reads a mail with no card around it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-23 23:00:37 +02:00