Which hosted forges are in use, and archiving one
For the host (a site admin). /forges answers "is this forge in use?" and lets you archive the ones that are not.
What each row says
- A person last did something here: a sign-in, a token used (a push), an account made by the claim, an issue, a comment, a run a person started. Never a heartbeat, telemetry, the engine's own ticks or what the crew did by itself. The host reads it from the forge's own tables, so a sleeping forge and one on older code answer alike (
src/spawn/person_activity.ts, asked throughsrc/spawn/child_db.ts). - Claimed by who, and when.
- What it costs to keep: its data directory's size, its memory while awake, the credit it has spent.
- Sort with the links above the list: needs you first, quietest first, most recent activity, costliest to keep (
?sort=quiet|recent|cost).
Archive and Restore
Tick one or several forges and press "Archive selected", or press "Archive" on a row; the next page says what will happen. Then, for each forge, in order:
- the destination takes and returns a small test file, so a forge is not stopped for a copy that cannot be kept; one archive or restore of a name runs at a time (a second ask is refused);
- the forge is stopped;
- its data directory and ledger are written as one
tar.gz(at most 256 MiB: it is held in memory to be verified; a larger forge is refused with a sentence, asleep and untouched) and uploaded to the host's backup destination (the one on the Backups page, orFORGE_SNAPSHOT_DIR), underforge-archives/<name>/; - the copy is read back and compared byte for byte (sha-256). If it does not match, or there is no destination, nothing is removed: the forge stays, asleep (it wakes on its next request), and the local copy is kept under
<data>/archive/files/; - only then the forge is removed, the local copy is deleted, and one line is left on
/forgesunder Archived naming where the copy is.
Restore on that line brings the forge back under the same name, from the copy (checked against its recorded hash first). It refuses if the name has been taken since, and refuses any copy that holds anything but plain files and directories under the forge's own names (the backup store is less trusted than the host).
The MCP forges tool does the same with archive: <name or names> and restore: <name>, planned unless dryRun: false. The MCP archives at most five per call. In the terminal, a on the forges screen archives one (the dialog names where the copy goes) and r restores one; the terminal has no sort, the page and the MCP list do.
Proposals
A forge that nobody claimed and no person has touched for 30 days is proposed for archive in the needs-you line on the home, with "archive" as the recommended choice. Nothing is archived by itself.
A claimed forge belongs to its claimant. After 30 untouched days the host mails them (to the address on their account there; a notice counts only when the mail was sent). That address is read from the forge's own data, which the forge writes, so it is not trusted as an identity: at most one notice is ever sent per forge, at most five per pass, and the words are this host's own, never the forge's. The forge is proposed only a week after that, and not at all if a person came back since. A host with no mail configured never proposes a claimed forge.
Events: forge.archived, forge.restored, forge.archive_noticed.