Reference
Operations Details
Contract capability details and retained proof boundaries.
On this page
This document preserves the operation-specific protocol names, address forms, field mappings and source-format details behind the contract clauses. Contract status and acceptance are defined only in CONTRACT.md.
API-001
/api/v1/ exposes pages, components, groups, incidents (create draft, publish an update under UPDATE-001's validation, resolve), maintenance, templates, subscribers (create, import, delete), audiences, metrics push and automation rules. An OpenAPI 3.1 document is served at /api/. Owners and Admins issue scoped tokens (read, incidents:write, components:write, maintenance:write, subscribers:write, metrics:write, admin). Each token is shown once, stored only as a hash, and has an expiry, a last-used time and an immediate revoke. Each token has its own rate limit with 429 and Retry-After. Every write is audited with the token's ID and issuing operator. Publication through a token still honors UPDATE-007 review and TEAM-004 roles: a token acts as its issuer, never with more rights. When shipped, this clause replaces BASE-ACCESS-002's session requirement for /api/v1/ only. The release that ships it states that replacement in the released clause's own Supersedes form. A change made with a token is recorded in TEAM-007's audit log, attributed to the token.
API-002
A subset of the Statuspage REST v1 API (/v1/ with component status PATCH, /v1/, /v1/ create and update, scheduled maintenance create and update with MAINT-009's mapping, /v1/ list, create and delete, /v1/ (SUB-019), and metric data points POST /v1/ into UPTIME-008) accepts Authorization: OAuth <token> with an API-001 token. Incident create and update map Statuspage's fields onto Lamp's: incident[status] sets the lifecycle (INCIDENT-001); incident[component_ids] attaches components; the components map of component IDs to statuses sets each component's claimed state with the update (UPDATE-012); and deliver_notifications=false selects no subscriber channel (NOTIFY-007). incident[body] becomes the customer-impact statement. A body longer than that statement's 250 characters fills it up to the last sentence or word boundary within the limit and continues, unchanged in its words, in the details statement, so bodies of up to 750 characters (UPDATE-001's combined length) are accepted. The affected-audience statement and the next-update interval come from defaults the owner sets on the compatibility token, so UPDATE-001's required fields always exist. Only a body longer than 750 characters is refused, with 422 naming the limit and the native fields, as Statuspage refuses invalid input. Existing scripts, CI steps and monitoring integrations written for Statuspage then work by changing the base URL. Lamp records which compatibility calls each token makes, so the owner can move them to /api/v1/.
API-004
A published Terraform provider manages pages, components, groups, audiences, alert sources, templates and automation rules, with plan and apply against API-001. A lamp.yaml file applied with rer's Lamp command shows a create/change/delete plan before applying it. Published GitHub Actions open and complete maintenance (MAINT-008) and draft an incident on a failed deploy: one private draft per workflow run, deduplicated by run ID, attached to the components the step names, with the run URL as an internal note (INCIDENT-008), and never published by the action. Configuration drift made in the UI shows up in the next plan.
SETUP-001
Setup asks the owner nothing that Lamp can do itself (owner decision, 20 October 2026). Every change republishes the public page, and Lamp checks its own public page and subscribe form after each publish and on the minute Cron, reading the real rendered form, and checks a hosted sender with the mail provider when it changes and daily. Overview shows one line: the page is live at its address, when it was published and when the page and form were checked, with Review page (Your page, /app/page: Lamp's preview of the page, what it checked and ways to try it) and Change address (Settings). A failing check turns that line amber with a short reason and the one thing to do. Results belong to the address they were read from. The deployment address is the public address by default; a custom domain is optional. Local development suppresses outgoing mail, offers no captured-mail inbox, and prepares automatic one-click owner entry without email (owner decision, 15 October 2026). To prove a subscriber notice was produced locally, publish to an active subscriber, let dispatch run, and inspect its suppressed outcome in Notifications or GET /api/app/deliveries; notification_deliveries records that outcome without a provider-acceptance claim. Locally the sender is reported as email being off, never as verified; the hosted check reads provider authentication and does not claim inbox delivery. Public GET paths remain database-free.
SETUP-002
A signed-in owner whose installation has no stored first-run completion is sent from every operator document to /setup, which asks for their website first (owner decision, 20 October 2026). Lamp reads that public site once, refusing private and loopback addresses on every hop and running none of its scripts, and fills in what the site gives: page name, tagline, mark (stored as a PNG), accent colour and components from its navigation, plus the time zone from the browser; it never invents what the site did not give. When the site links to a Statuspage, Instatus or Better Stack page, or one answers at status.<its domain>, setup takes that page's own components and groups from its public feeds in place of the navigation's, labelled with where they came from, and offers "Bring its incident history too" (owner UI pass L11, 22 October 2026): off unless chosen, it imports the page's resolved incidents with their updates and times through Move in's keyless read, as MOVE-002's silent history; nothing open on that page, no maintenance and no subscriber comes, and a page whose feeds give no components changes nothing. A site that cannot be read, or no website, leaves plain defaults with one calm line. Every fact stays editable before and after; confirming stores the settings, the mark and the components and stores completion durably; afterwards /setup opens the app and settings remain editable in Settings. A signed-out visitor to /setup is sent to sign-in and returned there. An installation that already had an operator before this clause is recorded as complete by its migration. A setup rerun never clears completion.
ACCESS-001
An owner with installation database access through Wrangler and the installation's SESSION_SECRET can issue a link for an existing active, non-erased operator; the remote command reads that secret only from its environment and refuses, naming it, when it is absent. The command uses the native hashed, 20-minute, single-use magic-link flow, records “sign-in link created from the command line”, and prints its only copy of the raw link once on stdout. It creates no operator or session; sign-in consumption creates the session under BASE-ACCESS-001 and BASE-ACCESS-002. Unknown, deactivated and erased operators receive the same refusal. Optional OpenID Connect sign-in through Auth, Google, Microsoft or Okta is supported by Base, off until the owner links and enables a provider; email magic links remain available. This replaces the former SSO exclusion. SCIM and role synchronization remain out of scope.
MOVE-005
Imported incident and maintenance source paths and supplied shortlink paths permanently redirect on the public host to each surviving record's Lamp permalink; maintenance has its own permanent page. Sorry numeric notice and supplied notice paths redirect to the matching incident or maintenance; /notices, /history and /history/YYYY/month (English month names) redirect to Lamp’s /history/ while a Sorry import is retained. Source Atom paths (/history.atom for Statuspage and Instatus; /feed.atom for Better Stack) serve Lamp's Atom feed after import, even without incident history, until a complete undo removes the import. These responses come from the same versioned snapshot as the page, without database queries. A second apply duplicates no aliases; conditional undo removes exactly the removed records' aliases and keeps preserved records' aliases. New imports refuse and name unsafe addresses, native-path collisions and conflicting destinations; an older retained source reports unusable aliases without withholding the public snapshot. Missing shortlinks are never invented. Source-owned shortlink hostnames remain outside Lamp's control. Better Stack REST reports supply no documented public URL; their paths are unavailable unless an unchanged saved status-page webhook supplies an exact shortlink with a matching report ID. No /incident/<REST-id> path is guessed. Better Stack maintenance messages are retained as historical updates, without creating native lifecycle notices or replaying notifications.
MOVE-011
The Statuspage reader (API key or saved responses, MOVE-001) also reads each incident's postmortem and the page's incident templates. The explanation an old incident page carried and the first-update wording the team relies on both survive the move. Postmortems. A postmortem the source published (postmortem_body with postmortem_published_at set) becomes that incident's HIST-002 post-incident report, published at its original time and silently under MOVE-002: no subscriber is notified, whatever postmortem_notify_subscribers said. Its text becomes plain text without losing words. Paragraphs and list items stay as lines, headings become lines of their own, links become their visible URLs under UPDATE-013, and images are named with their source URL and are never fetched or hot-linked. A Statuspage postmortem is one free-text body, so it fills the report's summary and leaves timeline, cause and remediation empty, which HIST-002's renderer omits; HIST-003 treats the report as published. An unpublished draft postmortem (a body with no publication time) is never published. It is kept as a private draft report on the incident, visible only to operators, and the dry run names it. MOVE-005's redirect from the old incident URL then lands on a Lamp permalink that shows the report, and PAGE-016's native API carries it. Templates. Each incident template (GET /v1/, or a saved incident-templates.json) becomes an UPDATE-009 template with its name, title, lifecycle (update_status), components with their states and channel default (should_send_notifications). Template groups become template folders. The body is mapped into UPDATE-001's fields: its first paragraph becomes the customer-impact statement and the rest the details statement, and the affected-audience statement is set from the template's components ("Customers using API, Dashboard"). A body part that exceeds its field's limit is reported in the dry run with the template and field named. That template is imported with the field marked for the owner to shorten before it can be applied, and its text is never silently truncated. Counts and undo. The dry run counts postmortems (imported, kept private or refused, with reasons) and templates (imported, or imported with a field to shorten) beside the other records, and the apply imports only what was reviewed. MOVE-003 never imports either twice, and MOVE-004's undo removes every imported report and template nobody has changed since, naming the ones it keeps. Status.io (MOVE-007) and incident.io (MOVE-008) imports carry their published post-incident text and templates by the same rules where their APIs expose them; that obligation and its proof belong to those readers' own clauses and ship with them. The release that ships this clause records MOVE-001, MOVE-002 and MOVE-004 as changed, and docs/moving-in.md stops listing post-mortem text and templates as omitted.
MOVE-012
A Statuspage private page (staff sign-in) or audience-specific page moves into Lamp's private and audience pages (AUD-001 to AUD-005), never onto the public page. Reading visibility. The Statuspage reader reads the page's visibility from the page record (GET /v1/pages/{page_id}: viewers_must_be_team_members and ip_restrictions) and, for an audience-specific page, its page-access groups and users (/v1/ and /v1/). It reads them through the API key, or from saved page.json, page-access-groups.json and page-access-users.json. A saved import without page.json is refused with the missing visibility evidence named, as the Better Stack reader already refuses one. Visibility is never assumed to be public. Where records land. A private source is imported as an AUD-001 private page, with its IP restrictions as an AUD-002 IP allow-list. An audience-specific source is imported as an AUD-001 page with one AUD-003 audience per page-access group, each with that group's components and with the group's users as explicit members by email. Each incident and maintenance keeps the visibility it had: on the private page, or for each audience whose group includes one of its components. Subscribers of the source page come in as AUD-004 subscribers of the Lamp page they belong to, under MOVE-010's channel rules and MOVE-002's invitations. No subscriber of a private or audience page becomes a public subscriber. Never public by accident. The dry run refuses to import a private or audience-specific source into the public page and names the reason ("the source page requires sign-in; choose or create a private page"), offering the private target instead. During dry run, apply, resume and undo, no private record reaches a public snapshot, feed, widget, badge, public API response or public notification (AUD-005). MOVE-005's old-address redirects for private incidents are served only on the private page's host, behind its sign-in. Access before go-live. Statuspage's team-member sign-in and SSO do not transfer. Cutover (MOVE-006) therefore lists, for each imported private page, the AUD-002 access method the owner must configure (an OIDC or SAML IdP, a magic-link email domain, or the imported IP allow-list) and the IdP groups that would match the imported audiences. Until one method is configured and its setup check passes, the private page serves only its sign-in page and admits nobody: it fails closed. Undo (MOVE-004) removes the imported pages, audiences, members and subscribers that nobody changed, naming what it keeps. The release that ships this clause records MOVE-001 and MOVE-006 as changed.
Unified import door — existing implementation status
This records the built lifecycle behind MOVE-001 to MOVE-006; it adds no acceptance points and changes no clause judgment. The signed-in owner mount (/api/) and Business grant mount (/api/rer/import/*) share the same importer and history for the statuspage, sorry, betterstack and instatus namespaces (src/).
| Lifecycle | Status and existing evidence |
|---|---|
| Opt-in and revocation | Built. The owner setting is off by default. A Business-configured first owner claim, or a later claim/sign-in while no setting row exists, can enable it; an existing owner choice is preserved (door-claim.ts, door.repository.ts). Key revocation is permanent. The seeded grant journey proves off/anonymous refusal, explicit opt-in and revoked/disabled refusal. |
| Uploads | Built in both mounts for all four namespaces, with chunk and complete-bundle hashes; unknown sources are refused. tests/ exercises the four source namespaces and public-HTTP checkDoor. |
| Plan | Built from the uploaded saved-response envelope, with source hash, reviewed fingerprint and native-page fingerprint (door-plan.ts). Planning retains custody/bookkeeping but makes zero native-object changes; the existing journey compares native snapshots before and after planning. |
| Apply | Built with exact reviewed-fingerprint approval and native guards. Imported history is silent; Business subscriber rows are deactivated and held until separate cutover approval (door-plan.ts). The journey refuses a wrong fingerprint and premature invitations, and asserts no new notifications. |
| Reconcile | Built against native targets through the public door. The existing journey checks source/native accounting; its catch-up replaces a changed incident, adds one incident and reconciles the result. |
| Undo | Built with preserve-conflicts behavior: edited native records are retained rather than falsely reported as removed. Catch-up layers undo newest first; the journey refuses old-first undo, restores the previous native state and revisions, then undoes the baseline. |
| Bounded catch-up grants | Built. Signed action/source-bound grants carry byte, chunk, record and expiry bounds; catch-up uses reviewed approval or an applicable standing allowance, with native revision guards. The existing seeded journey exercises bounded catch-up, replacement, reconciliation and layered undo; this does not establish arbitrary-scale or real-source acceptance. |
Custody is installation-local: native archives exclude ik_door_% (scripts/). Subscriber deletion and expiry compose kit custody retirement, withdrawing retained bundle/plan/archive bytes containing the subject while retaining audit/lineage metadata (src/, src/). The Sorry journey checks subscriber erasure against retained import copies. This is not a claim that all door metadata is deleted.
Real-source receipt/registry evidence remains open. MOVE-007 and MOVE-008 remain missing; MOVE-010 remains missing with released imports carrying email subscribers only; MOVE-012 remains partial, refusing private/audience sources rather than importing them as private. The built door does not close those source, channel or privacy gaps.
Social publication protocol retained from accepted main
As Statuspage posts incidents to Twitter, the owner can connect the page's own X account, and also a Bluesky or Mastodon account. X uses OAuth 2.0 with the tweet.write scope through the owner's X developer app, and the owner's X API tier and its cost are theirs. Bluesky uses an app password, and Mastodon an access token with write:statuses. Credentials are stored only encrypted, as NOTIFY-011's are. Social accounts are a channel the operator selects per update (NOTIFY-007), and they default to off for each new update unless the owner turns on "post by default". Each post holds the owner's prefix, the update's lifecycle and customer-impact statement, cut to the network's length at a word boundary, and the incident permalink. Every later update of the same incident replies to the previous post, so an incident is one thread. Maintenance notices post when the owner chooses. Posts are delivered at most once per update per account (NOTIFY-005), retried under NOTIFY-003 and recorded in the delivery log with the network's post ID (NOTIFY-004). A failing account never delays the page or other channels (NOTIFY-009), and its failure is an operator alert (NOTIFY-006), because posting integrations do fail. Retroactive updates and imports post nothing. Network origins are declared in seed.json → externals when shipped.
This page is drawn from docs/contract/operations-details.md in the repository. Edit it on GitHub.