Classify every stray file of the record stores, and sweep the ones that are nobody's
Walk the publish temps of every record store, the rename temps under the layer's local half and the tracked sessions section, and the site generator's staging directories at the repository root; give each a verdict by reading its age and then its content; and, unless the call is a check, remove the ones the verdict says nothing is holding. Nothing is deleted for being unrecognised: a temp holding the only copy of a record is reported as `incomplete` and left for the caller to publish, content this version cannot classify is `foreign` and left exactly where it is, a candidate whose age this platform cannot read is `unmeasurable` and never a candidate, and no directory is ever removed. The threshold is required and has no default, because a sweep measuring against an absent threshold would find every file stale.
- command
- behaviorally_verified
- benchmark required
- cache disabled
- MCP tool majordomus_recover_orphans
Request body — RecoverOrphansInput, JSON
example check-one-second
{"older_than_seconds":1,"check":true}example check-twelve-hours
{"older_than_seconds":43200,"check":true}Try it
The port is whatever the server logged; 8741 is the one it asks for first. The values are the operation's first example.
curl -s -X POST "http://127.0.0.1:8741/api/v1/recover/orphans" -H "content-type: application/json" -d '{"older_than_seconds":1,"check":true}'Tested by apps/majordomus-cli/tests/http_serve.rs, which replays the route with these values against a server on a real socket.
Responses
| status | body | meaning |
|---|---|---|
| 200 | RecoverOrphansResult | Classify every stray file of the record stores, and sweep the ones that are nobody's: the result. |
| 400 | ErrorBody | invalid_input: The input does not fit the schema: a parameter of the wrong type, an unknown one, or a value the capability rejects. |
| 404 | ErrorBody | not_found: The input names something the repository does not hold. |
| 422 | ErrorBody | refused: The command was understood and turned down for the reason the message gives. |
| 500 | ErrorBody | internal: The capability failed for a reason of its own; the message names it. |
| default | ErrorBody | Any other failure the transport reports: 405 method_not_allowed for another method on this path, 400 invalid_input for a body that is not a JSON object. |