Research on Interplane
Research is a literature registry with author pages, citations and an ask agent. Papers can come from a Radicle repository or public Zenodo metadata. Zenodo mints DOIs in the author's account; Interplane does not mint them or take custody of a Zenodo or ORCID token.
This branch implements the source change. It is not deployed. The live service and its data folder were not changed. Host fixture checks are not a claim of deployment or of scientific review.
Parts
| Part | Purpose |
|---|---|
registry/catalog.tsv, registry/text/ | Drake's existing catalog and full text; existing work URLs and documents remain compatible |
registry/a/<id>/*.tsv | raw records from accepted requests; outside forged's writable folder |
registry/show/<id>.tsv | derived catalogs after removal and shelf-state checks; the publisher reads these, not the raw records |
build.om, publish.sh | build the hub, author and work pages, JSON, BibTeX and the ask corpus without a network |
route.om, intake-route.om | serve built documents, queue questions and reuse the open shelf intake |
sync.om, sync.sh | metadata admission in Omega and thin curl/git/file IO outside forged |
lib/jflat.om, lib/PROVENANCE | seeded Omega JSON decoder, copied at a recorded source commit |
agent.om | retrieval, quoted-data model request and code-owned answer/source documents |
../tools/doi/ | local-author deposit tool and its fixture gate |
Transport uses first-argument curl -q, --globoff, an empty proxy setting and explicit --url
data. A bracket/brace in an attachment URI is one literal request, not a curl expansion program;
operator curlrc redirect/auth options are not inherited. The local TLS fixture uses real curl,
not only an option-logging stand-in.
There is no second file-upload endpoint. forged still runs without a network. The sync program is
separate, like agent.om; only it reads the public Zenodo API and repositories accepted by the shelf.
Pages
| URL | Document |
|---|---|
/research | hub across authors, works and the ask box |
/research/authors/<id> | an author's record, works and provenance |
/research/<slug>, .json, .bib | a work and its machine-readable citations |
/research.json, /research.bib, /research.txt | aggregate documents |
/research/add | the three ways to add work |
/research/add/ | Radicle-key sign-in and forms: repository ID, ORCID iD or Zenodo DOI |
/research/doi | Get a DOI for your work; links to the local tool |
/research/ask?q=..., /research/ask/<id>[.json] | question queue and public answer |
Pages use /assets/tokens.css and research.css, with no scripts. forge.css and token colours are
unchanged. Author IDs and work slugs are restricted to lowercase letters, digits and hyphens.
Drake's author ID is drakestapleton. His existing 16 HTML/JSON/BibTeX work documents are checked
against base hashes in tests/fixtures/base-sha256.txt; the hub changes to list other authors.
Bring a paper repository
On the author's machine, put the paper in paper.pdf, paper.md or paper.txt, a LICENSE
(LICENSE.md, LICENSE.txt, LICENCE or COPYING also works), and .zenodo.json at the top level.
The supported metadata format is JSON, not a partial CFF/YAML parser. For example:
{
"title": "A result with its limits",
"description": "The abstract.",
"creators": [{"name": "Family, Given"}],
"upload_type": "publication",
"publication_type": "preprint",
"license": "cc-by-4.0"
}
Commit it, run rad init, seed and announce the repository with Radicle from that machine. Sign
in at /research/add/ with the Radicle key and give its rad:z... ID. The repository form calls
the existing shelf POST: sign-in, CSRF, consent, rate counter, disk-space checks, queue and intake
refusals are shared. Research does not fetch a repository itself. It waits for the shelf to accept
it under that key, then pins a commit and reads its metadata, tree and paper through read-only git commands. A G record binds the listing to that commit and the paper SHA256.
No repository hook, filter, checkout or paper-supplied command is run.
The listing says Not verified and names the key that brought it. This is not a claim that the key wrote the paper or belongs to a named person. A repository without a usable LICENSE or paper file is refused by research. The shelf may still list the project as an open build.
Sync public records
Give an ORCID iD, a Zenodo DOI (10.5281/zenodo.<number>) or both at /research/add/. A DOI-only
request uses a creator ORCID iD from that record; a DOI whose creators have no ORCID iD is refused.
For a claimed iD, a record is included only if the Zenodo record itself carries that exact iD
among its creators. A matching search result alone is insufficient. Requesting public metadata
gives a key no ownership or exclusive ORCID custody. A second key can sync the same iD, including
after the first key is removed. Author and work pages separate the public author name/ORCID from
the requesting key and state that no personal identity or ownership is established. The page names
the requester, not a verified author account. No ORCID sign-in or ownership proof step is required.
For a coauthored record, work slugs and cached text are consistently namespaced by the author ID;
each creator's catalog can include the record without colliding in the combined publication.
Full text is copied and included in the ask corpus only for these licence identifiers (case folded):
cc-by-4.0,cc-by-sa-4.0cc-by-3.0,cc-by-sa-3.0cc0-1.0
Conflicting duplicate licence identifiers or containers deny full text in either order. The JSON decoder preserves container occurrences, so disjoint duplicate objects cannot hide the conflict. These identifiers permit redistribution, subject to their terms. Other or missing licences give metadata only: title, abstract, DOI and links, with no full text in the corpus. Code-licence names are not treated as permission to redistribute a paper. The provenance names the source and licence; a listing is not legal advice or an independent licence audit. An already-copied text is not used if a later record's licence is not on the list. At most one PDF, text or Markdown file is copied per record. The live comparison check fetched metadata only, not the papers.
Takedown and who may add
The operator supplies the same allow and remove files used by open/intake.om. A missing
allow file refuses additions; * permits a signed-in key, or the file can list allowed DIDs.
The remove file can name a key or repository as on the shelf. Sync also recognises a bare ORCID iD
or DOI there. It filters author/work listings, and withdrawn or refused shelf rows stop producing
research works. Raw accepted catalogs are retained outside the published tree; obsolete or failed-refresh cached text may be discarded; they are not
served or fed to the model after filtering. Existing published foreign work/author documents are
absent from the newly selected public generation; ask/ and the intake queue stay outside that generation. Previously public answer URLs
may still cite a taken-down work. Removing those answers is an operator decision, not automatic here.
A pending shelf request is retained in a private pending file for retry; it does not hold up queue reclamation. Refusals from metadata, allow or remove checks are logged; removals are applied before network IO and again when a pass finishes. The operator must run sync and publish to update the research listing. No new daemon is installed by this change. A private synced registry is not a public deployment.
Admission transactions and decoder containment
The worker holds the registry lock and first builds a removal-only candidate. It then stages each
addition or refresh separately and runs the complete publisher on that candidate, including the
aggregate metadata, page and corpus limits. A candidate that exceeds a limit or cannot build is
refused before it becomes active. requests.tsv records the requesting key and a validated,
refused-publication, refused-metadata or pending-shelf result. Validated means the candidate built;
activation is the later atomic current switch, not the log entry. A rejected addition does not prevent
an unrelated takedown from publishing. The worker atomically switches current only to a complete
validated generation; a, show and text are compatibility links into it. The publisher pins that
private registry generation under the same lock; public publication is the separate transaction below. There is one retained active generation; raw accepted metadata
remains in it, while old generation directories are removed only under the lock. A fresh staging
registry is initialised with the tracked legacy catalog/text if those are absent.
Queue and direct --zenodo refreshes do not reuse a slug's old text as proof of the new attachment. Its candidate discards
the old cache for each refreshed work; a failed fetch, decode, unsupported attachment or missing
text makes that refreshed work metadata-only. If the refresh itself fails admission, the previous
consistent generation is kept. Remove-file absence means no removals, as on the shelf. Other policy
open/read/type errors and a policy beyond 65,535 bytes fail closed, with no replacement generation.
The operator must shorten an oversized policy file; it is not silently truncated.
PDF decoding is the one systemd dependency here: an authorised, uniquely named transient **user
scope**, not an installed unit file. decode.sh uses systemd-run --user --scope --collect with
MemoryMax=128M, MemorySwapMax=0, TasksMax=8 and KillMode=control-group, enclosing the timed
namespaced decoder. The scope bounds the decoder process tree, not just one process. The decoder
has 30 seconds (an outer 35-second manager deadline), no home/network/writable host filesystem,
and at most 8,388,607 stdout bytes persisted through a bounded pipe. Extra output, memory/task
exhaustion or failure discards the staged text. Diagnostics are bounded to 4,096 saved bytes.
No user manager/controller means no extraction: there is no unbounded fallback. Only a scope whose nonce description, manager invocation/group and live claimant/launcher identity
prove this extraction owns it is stopped. A name collision or failure before unit creation does
not stop an existing scope. The owned scope is collected after extraction. The policy is deliberately small for untrusted PDFs;
a legitimate PDF can be refused and still have a metadata-only listing. This transient-scope host
adapter is recorded migration debt against the aien-supervise rule, not an Omega decoder or a new
supervisor deployment. No unit file, timer, enable, daemon-reload or existing-unit change is made.
Lossless layout and selected-state provenance
research-sync layout raw converts one complete raw import without applying policy, selecting,
deduplicating or aggregating licences. It preserves W/P/R/T/G facts and original P flags, attaching
N slug key value static profile facts and I slug original-open to each bundle. These are private
registry facts, not new public author/identity claims. A selected catalog keeps these associations
for each work even though its public-compatible O block describes just one current author
profile. Repeated filtering cannot substitute another work's or a rejected request's profile.
The worker lays out each retained raw file, concatenates all copies, then gathers once. It does
not use gather as a layout converter: a nonwinning or ineligible copy can still carry an explicit
work-wide DOI/RID takedown witness. The fallback lays out the prior selected state and fresh import;
retained raw copies after an internal X boundary are auxiliary evidence for explicit denials and
eligible-copy licence checks only. They cannot win selection or render. Requester removals remain
per-bundle, distinct from explicit work/source takedowns across copies.
layout selected requires the per-bundle N/I association. An old selected catalog that lost this
information refuses with SELECTED_PROFILE_UNBOUND and rebuild instructions; the tool does not
invent a profile from its shared O block. Rebuild from retained raw imports (layout each raw file,
then one gather). A legacy standalone raw header profile can still be converted. Public publisher
O/U compatibility and the existing work URLs/documents are unchanged.
I retains original own permission, but a selected-only/fallback gather deliberately does not reopen an aggregate-closed effective P flag merely because losing copies are absent from the selected stream. A successful full raw selection recomputes eligibility and may reopen text after a closed requester is removed. Until then, conservative withholding can leave a work metadata-only; this is not ownership or exclusive requester custody.
Public publication and reader visibility
publish.sh stages the complete public set and corpus.txt in OUT/gen/public.<unique>.
After building and syncing that set, it replaces one OUT/current link. Fixed compatibility
links (OUT/w, OUT/a, index and aggregate leaves) and the external corpus path all follow that
same pointer. Mutable OUT/ask answers and OUT/add intake state are outside the switched tree.
The research router resolves and pins the concrete generation once per HTTP request, before its
existence check and later stream open. The agent opens one corpus inode for a question. Each such
reader gets a complete old or complete new generation, including if a publisher is interrupted.
Independent HTTP requests, or an HTTP request and a later corpus open, may straddle a switch:
there is no cross-request/session snapshot promise. A link in a previously loaded index can lead
to a removed work's current 404 after a later switch. Already loaded questions/answers are not
revoked by a takedown.
The first publication or conversion of a legacy layout must finish before readers start; bootstrap compatibility-link installation is not an atomic live conversion. Old named public generations are retained for delayed path opens; do not delete them while readers can still be using them. This retention consumes disk and is not a fixed-time garbage-collection claim. Incomplete staging names are recovered under the publisher lock. Private registry activation is namespace-atomic, not a power-loss durability certification. No live conversion/deployment was performed by this source work.
Removal acknowledgement boundary
For an online full replacement of the operator's REMOVE file, use:
sh research/policy.sh REMOVE < replacement-remove-file
The helper bounds input to 65,535 bytes, atomically replaces the same shelf policy file under
REMOVE.lock, and emits REMOVE_REPLACED sha256=... under that lock. The worker holds that lock
while it re-reads policy and shelf state, gathers the selected candidate again, validates and
activates its final private generation. A helper acknowledgement preceding this commit is consumed
by that completed pass, including when additions fetched/decoded/built unsuccessfully. An
acknowledgement after lock release belongs to the next pass. Raw editor writes outside this
protocol have no acknowledgement/commit timing guarantee. The consumed digest is recorded as
.remove-sha256 (absent if the file is missing); private publication still needs the public
publisher to complete. The acknowledgement alone is not a claim that the live page has changed.
When an older surviving raw bundle would exceed current capacity after reselection, the worker
tries the prior validated selection plus the fresh import instead and reports
WITHHELD_RESELECTION. If no foreign selection can build, it withholds foreign show records and
validates legacy-only state so an explicitly removed work is not left active by a failed commit.
Raw bundles and their immutable cache identities remain available for later capacity recovery;
this is capacity containment, not exclusive requester authority. The fixture checks that a large
older copy can be withheld while unrelated works/removals continue, then restored with its own
matching old text when capacity is available.
Build and stage (after review)
Dependencies: the repository-pinned Linux AArch64 omc (SHA checked by the scripts), curl, git,
pdftotext, bwrap and a systemd user manager with delegated memory/tasks controllers for PDF extraction, and the existing shelf intake. Tests use Python as an independent JSON/hash
oracle and a C host-only resource adversary (not product code); the product admission and page logic are Omega.
Use a new staging folder, not the live data directory:
sh research/build-tools.sh "$HOME/research-stage/bin"
mkdir -p "$HOME/research-stage/registry"
cp research/registry/catalog.tsv "$HOME/research-stage/registry/"
cp -R research/registry/text "$HOME/research-stage/registry/"
export RESEARCH_TOOLS="$HOME/research-stage/bin"
# ADD/ is the new forged queue location <data>research/add/.
# ALLOW and REMOVE are the existing open intake work folder's allow/remove paths.
# LIST is <data>open/list.tsv; STORAGE is the Radicle storage root.
sh research/sync.sh --queue ADD/ STATE ALLOW REMOVE \
"$HOME/research-stage/registry/" LIST STORAGE
sh research/publish.sh "$HOME/research-stage/pages/" \
"$HOME/research-stage/corpus.txt" "$HOME/research-stage/registry"
The placeholders must be replaced with the operator's configured paths. Do not point a trial run at the live queue or live corpus. To replay a saved public API response without network IO:
RESEARCH_TOOLS="$HOME/research-stage/bin" sh research/sync.sh --zenodo \
0009-0002-6890-7111 did:key:z6MkAbcdefghijkmnopqrstuvw111111111111111111111 \
2026-11-11 example /tmp/example/a/example/zenodo.tsv research/tests/fixtures/zenodo.json
The raw catalog is not published until gather has checked each bundle against removals and shelf state.
Direct --zenodo can take a final optional SERIAL after RESPONSE_JSON and TEXT_DIR (default 1);
this operator serializer is not queue serial authority. The queue loads .serial from its active
generation and assigns increasing signed-machine counters. At 9223372036854775807 it refuses a
further import cleanly but still commits final removals. Use the queue
path for normal operation. --zenodo is a local import/replay interface, not an HTTP authentication
path. A sync pass advances its saved offset after processing. Pending shelf fetches are retried from the private pending file. Consumed queue prefixes are reclaimed under the same queue.lock that forged takes when appending. Cursor reset precedes atomic replacement, so a crash may replay an idempotent import but cannot skip an unread request. Running the queue adapter in parallel is unsupported; one operator runs a pass at a time.
The existing research agent can read the staged corpus in once mode with a staged ask folder.
Installation of a service, publication of pages and deployment of forged remain operator actions.
For the author's DOI tool, see tools/doi/README.md. It runs on that author's machine with their
token in the environment, defaults to sandbox, records a reserved DOI in repository metadata and
requires an explicit typed yes to publish. The server does not receive that token.
Registry and limits
Legacy tab-separated facts are unchanged: O key value; H id title blurb; `W slug thread date
kind venue concept-doi version-doi version version-count on-orcid licence title; S/A/C/B slug text`;
V slug doi date version; F slug name bytes https-url; K slug keyword; E slug relation slug;
L slug relation https-url. A field has no tab or line end.
New facts: U id name orcid added-by via checked is an author; J slug id connects a work to its
author; P slug how did date source open-text records provenance (how: zenodo/radicle;
open-text: 1/0). R slug serial orders eligible complete provenance bundles; T slug text-sha256
binds cached normalised text (- means absent). Text is stored as text/<slug>.<sha256>.txt, not
a mutable slug-only alias. Removal/shelf eligibility is checked per complete bundle before
deduplication; the newest eligible R supplies its metadata, requester and T together. A removed
copy cannot suppress another eligible one or close its licence; conservative licence reconciliation
uses surviving copies only. G slug commit paper-sha256 binds repository data to one source snapshot (40 and 64 lowercase hex characters). Overlapping imports select one eligible complete work bundle; a closed surviving licence decision closes full-text admission. merge converts a filtered author's O facts into U, adds J for its works,
and retains its work facts. The legacy O profile still describes Drake. No fake key is attributed
to old imported records; their existing ORCID/DOIs stay intact.
Inherited builder limits: catalog 262,143 bytes, document 2,097,152; title 400, summary 600, abstract 12,000 bytes, cut at UTF-8 boundaries. Corpus 4,194,303 bytes, 256 works, 8,192 passages. Question 300 bytes, answer 65,536. The write gate is the shelf's 30 writes per key per minute plus its address limit and free-space measure. Research's request queue has the ask queue's 4 MiB containment boundary. Input metadata is bounded to 8 MiB, fields decoded to one line, foreign text keeps complete paragraphs up to 262,144 bytes, at most 200 records/author, 16 files/keywords/links per work and 64 creators. File transport also refuses over 8 MiB and has a 60 second timeout; PDF extraction has a 30 second timeout and a bwrap sandbox without a home, writable host files or a network. These contain untrusted foreign input, not a claimed machine capacity. The local DOI tool currently targets Linux AArch64 and has its own documented input limits. The inherited caps and any refusal are reported rather than described as unlimited scale.
Untrusted strings are escaped separately for HTML, JSON and BibTeX; links other than https are
dropped. Foreign corpus paragraphs are prefixed as quoted data, so a planted corpus header cannot
invent a source. Titles, passages and the question stay out of the model's system instructions.
Passage fallback splits align to complete UTF-8 characters and resume without dropping a byte;
only an actually found separator is skipped. The gate reconstructs long multibyte/unbroken
paragraphs through the real splitter and strictly decodes the selected model request.
The code, not a model response, builds source lists and the HTML/JSON output frame. --gate on the
agent exercises that boundary with a fixed answer and no model socket. It does not prove a live
model's resistance to prompt injection. Retrieved passages are lexical matches, not a truth test.
Checks and what is not run
sh research/tests/run.sh
The gate checks legacy baseline SHA256, separate authors, escaped stranger markup, https filtering,
licence and ORCID refusals, distinct negative controls, fixture text copying, withdrawals, signed-in
intake, prompt framing and DOI fixtures. Regressions also cover overlapping imports through the publisher, same-batch key custody, a HEAD change between validation and copying, queue reclamation and DOI symlink/snapshot safety. The saved public live response is
tests/fixtures/zenodo-live.json: 15 accepted Zenodo records, matching 15 Zenodo rows in the
16-work legacy registry (the other work is Crossref). The public request was read-only.
Not run: a real Zenodo deposit (sandbox or production, an author's token is required), a live model injection trial, deployment, production intake, publication or changes to live data. No statement here claims the branch has landed. Confirm the remaining policy with Drake: which keys may add, takedown treatment of old answers, and the accepted licence identifiers. The confirmed default is requester-only public metadata: no exclusive ORCID custody and no ownership proof step.