Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/interplane-forge/blob/main/research/intake-route.om
# interplane-forge
INTERPLANE Forge
Brought by drakestapleton
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
branch `main` Branches Tags History
`interplane-forge / research / intake-route.om`
292 lines ยท 6918 bytes Raw Blame History
1 note Research intake adapter, composed only beside the open shelf. Its repository POST calls
2 note ohpost unchanged: the shelf's sign-in, CSRF, permission, write limits, queue and refusal paths.
3 note Research records only a request to index that repository after the shelf has accepted it.
4 note Zenodo requests use the same write precheck, per-key rate counter and disk-space measure.
5 text rqpath "/research/add/"
6 text rqdir "research/add/"
7 text rqqueue "queue"
8 text rqlk "queue.lock"
9 text rqtitle "Add your work"
10 text rqorc "orcid"
11 text rqdoi "doi"
12 text rqsync "sync"
13 text rqzpre "10.5281/zenodo."
14 text rqmsg "Give a repository ID, an ORCID iD or a Zenodo DOI. Links and files are not accepted here."
15 text rqwait "The request is queued. Public metadata will be listed with the key that asked. A repository appears only after the open shelf accepts it. Not verified."
16 text rqh " Bring a paper repository, sync public Zenodo records, or get a DOI for your work. Read the steps. A listing is not proof that a key belongs to an author. Public metadata and repository text are not verified. The operator can take a listing down by key or repository. Sign in with your key to add work.Add your work
Bringing new projects is closed until Interplane's own store accepts them.
" 19 text rqf3 "Give an ORCID iD, a Zenodo DOI, or both. A record is filed under an author only if that record carries the ORCID iD among its creators. This is a listing from public metadata by the key that asked, not an ORCID sign-in.
" 21 global rqo uchar 20 22 global rqol ulong 1 23 global rqd uchar 40 24 global rqdl ulong 1 25 fn rqform to long 26 if not fget 27 ret 405 28 end 29 put fkind 0 0 30 fsetti rqtitle 31 fput rqh 32 if not ohdid 33 fput rql 34 ret 200 35 end 36 fput rqf1 37 fput rqf3 38 socsrfout 39 fput rqf4 40 ret 200 41 end 42 note rqappend: P or Z, did, rid or ORCID, ORCID(empty) or DOI. Failed append is rolled back. 43 note Mutable intake state must not use rxfile, which pins immutable public generations. 44 fn rqfile name view uchar * to void 45 put ffilel 0 0 46 for i ulong len tfdata bound 128 47 ffilc get tfdata i 48 end 49 for i ulong len rqdir bound 64 50 ffilc get rqdir i 51 end 52 for i ulong len name bound 16 53 ffilc get name i 54 end 55 end 56 fn rqlock to long 57 rqfile rqlk 58 fd = fopen ffile 0 get ffilel 0 558145 384 59 if lt fd 0 60 ret -1 61 end 62 r = flock int fd 6 63 if ne r 0 64 x = fclose int fd 65 ret -1 66 end 67 ret fd 68 end 69 fn rqappend kind uchar to long 70 rm = ohroom 400 71 if or eq rm 1 eq rm 3 72 ret soerr 503 tomroom 73 end 74 rqfile rqqueue 75 put ffilel 0 sub get ffilel 0 len rqqueue 76 r = makedir ffile 0 get ffilel 0 448 77 lf = rqlock 78 if lt lf 0 79 ret soerr 503 tomsgq 80 end 81 rqfile rqqueue 82 fd = fopen ffile 0 get ffilel 0 558145 384 83 if lt fd 0 84 x = fclose int lf 85 ret soerr 503 tomsgq 86 end 87 sz = ohsize int fd 88 if or lt sz 0 gt sz `4193904` 89 x = fclose int fd 90 x = fclose int lf 91 ret soerr 503 tomsgq 92 end 93 b = new uchar 400 0 94 n = ulong 0 95 put b n kind 96 n = add n 1 97 put b n 9 98 n = add n 1 99 for i ulong get godidl 0 bound 96 100 put b n get godid i 101 n = add n 1 102 end 103 put b n 9 104 n = add n 1 105 if eq kind 80 106 for i ulong get goridl 0 bound 44 107 put b n get gorid i 108 n = add n 1 109 end 110 else 111 for i ulong get rqol 0 bound 19 112 put b n get rqo i 113 n = add n 1 114 end 115 end 116 put b n 9 117 n = add n 1 118 if eq kind 90 119 for i ulong get rqdl 0 bound 40 120 put b n get rqd i 121 n = add n 1 122 end 123 end 124 put b n 10 125 n = add n 1 126 w = write int fd b 0 n 127 if ne w long n 128 if ge sz 0 129 x = ftrunc int fd sz 130 end 131 x = fclose int fd 132 x = fclose int lf 133 ret soerr 503 tomsgq 134 end 135 x = fclose int fd 136 x = fclose int lf 137 ohused n 138 put fkind 0 0 139 fsetti rqtitle 140 fput rqh 141 fput rqwait 142 fput toend 143 ret 200 144 end 145 note Preflight before a shelf mutation. A later IO fault is reported as partial acceptance, not 146 note "nothing saved": the shelf retains the RID/key/note and the reply carries the retryable ID. 147 fn rqpre to long 148 rm = ohroom 400 149 if or eq rm 1 eq rm 3 150 ret soerr 503 tomroom 151 end 152 rqfile rqqueue 153 put ffilel 0 sub get ffilel 0 len rqqueue 154 r = makedir ffile 0 get ffilel 0 448 155 lf = rqlock 156 if lt lf 0 157 ret soerr 503 tomsgq 158 end 159 rqfile rqqueue 160 fd = fopen ffile 0 get ffilel 0 558145 384 161 if lt fd 0 162 x = fclose int lf 163 ret soerr 503 tomsgq 164 end 165 sz = ohsize int fd 166 x = fclose int fd 167 x = fclose int lf 168 if or lt sz 0 gt sz `4193904` 169 ret soerr 503 tomsgq 170 end 171 ret 0 172 end 173 text rqpart "The shelf accepted this repository. Research indexing was not queued because storage changed after admission. The shelf retains the repository ID, the requesting key and the paper note. Retry the ID below at Add your work.
" 174 text rqp2 "
This is a partial acceptance, not a claim that nothing was saved. The shelf listing is not verified.