interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / apps / interplane-forge / salvage / 20web.om

964 lines · 20157 bytes Raw Blame History
1text tlparent "View original source revision"
2text tlhidden "This part is not publicly visible. It is a draft or its original source is unavailable."
3text tlpriv "<p class=\"meta\">Your private revision</p>"
4text tlgone "<p class=\"meta\">Withdrawn from public view</p>"
5text tlph1 "The verifier could not prepare the pinned compiler or private scratch storage."
6text tlph2 "The compiler refused the source or exceeded its resource budget."
7text tlph3 "The program did not complete successfully inside the strict sandbox."
8text tlph4 "The program output did not match the declared bytes. Check whitespace and the final newline."
9text tlphx " Exit status: "
10text tlphs "; signal status: "
11text tlquota "Storage allocation reached. This instance holds at most 4096 immutable revisions and 64 per author, including drafts and withdrawn revisions. No new record was saved."
12text tlempty2 ""
13text tlquery "?before="
14text tlrootp "/salvage/"
15text tlnewurl "new"
16note Native, opt-in salvage surface. A signed session DID owns records, never its display name.
17text tlenv "INTERPLANE_SALVAGE_DIR="
18text tlslash "/salvage"
19text tlnewp "/salvage/new"
20text tlslug "salvage/"
21text tlact "action"
22text tlsource "source"
23text tlderive "derive"
24text tlverify "verify"
25text tlpub "publish"
26text tlwith "withdraw"
27text tltitle "title"
28text tlorigin "origin"
29text tllic "license"
30text tldesc "description"
31text tlcredit "credit"
32text tllang "language"
33text tlstdin "input"
34text tlexpect "expected"
35text tlcons "consent"
36text tlyes "yes"
37text tlmit "MIT"
38text tlapache "Apache-2.0"
39text tlbsd "BSD-3-Clause"
40text tlcc0 "CC0-1.0"
41text tlomega "Omega"
42text tlver "salvage-v1"
43text tldid "did:key:"
44text tlplain "text/plain; charset=utf-8"
45text tlbinary "application/octet-stream"
46text tlattach "attachment"
47text tlno "no-store"
48text tlbase "<div class=\"sl\"><p class=\"eyebrow\">INTERPLANE / THE SALVAGE YARD</p>"
49text tlclose "</div>"
50text tlhref "<a href=\""
51text tlendh "\">"
52text tlenda "</a>"
53text tlh1 "<h1>"
54text tlh1e "</h1>"
55text tlp "<p>"
56text tlpe "</p>"
57text tlpre "<pre>"
58text tlpree "</pre>"
59text tlcard "<article class=\"sl-card\">"
60text tlcarde "</article>"
61text tlnewh "A rough build belongs here."
62text tlliste "A small idea can become somebody else's starting point. Share unfinished source, make a useful native Omega part, and reproduce its declared example."
63text tlnewln "Bring a build"
64text tlback "Back to the yard"
65text tlform1 "<form method=\"post\" action=\""
66text tlform2 "\"><input type=\"hidden\" name=\"csrf\" value=\""
67text tlform3 "\">"
68text tlforme "</form>"
69text tlbtn1 "<button name=\"action\" value=\""
70text tlbtn2 "\">"
71text tlbtn3 "</button>"
72text tlfields "<label>Give it a name<input name=\"title\" maxlength=\"160\" required></label><label>What works, and what doesn't?<textarea name=\"description\" maxlength=\"2048\" rows=\"3\" required></textarea></label>"
73text tlmsg0 "<label>Original project or source URL<input name=\"origin\" maxlength=\"512\" required></label><label>Original author and attribution<input name=\"credit\" maxlength=\"512\" required></label><label>Source language<input name=\"language\" maxlength=\"128\" required></label><label>Permission to reuse<select name=\"license\"><option>MIT</option><option>Apache-2.0</option><option>BSD-3-Clause</option><option>CC0-1.0</option></select></label>"
74text tlfcode "<label>Source text <small>Up to 16 KiB. UTF-8 text is stored with LF newlines.</small><textarea name=\"source\" rows=\"14\" maxlength=\"16384\" spellcheck=\"false\" required>"
75text tlmsg1 "</textarea></label>"
76text tlfex "<label>Example input<textarea name=\"input\" rows=\"3\" maxlength=\"4096\" spellcheck=\"false\"></textarea></label><label>Exact expected output <small>Include a final newline if the program writes one. Maximum 4 KiB.</small><textarea name=\"expected\" rows=\"3\" maxlength=\"4096\" spellcheck=\"false\"></textarea></label>"
77text tlfcons "<label class=\"sl-check\"><input type=\"checkbox\" name=\"consent\" value=\"yes\" required> I have permission to share this publicly under the stated license. It contains no secrets or personal data. I understand public copies cannot be recalled.</label>"
78text tlshared "Share this source"
79text tlsavep "Save an Omega draft"
80text tlmake "Make a useful part"
81text tlmakep "Keep the useful idea and edit the source into a self-contained native Omega program. Credits and license carry forward. This is a human-assisted repair, not an automatic conversion."
82text tldraft "Private draft. Only its author can view it until a passing example is explicitly published."
83text tlpass "Declared example reproduced. This exact revision compiled with the pinned seeded compiler, ran under the strict sandbox, matched the expected output, and rejected an altered expected output. This is evidence for one example, not a proof of safety or general correctness."
84text tlfail "Verification refused. Compilation, sandbox execution, exit status, time/output limits, or the declared output did not pass. Edit a new draft or retry this revision."
85text tlmsg2 "No passing receipt yet. Start verification, then refresh this page to see the result."
86text tlmsg3 "Verification is running. Refresh this page to check its receipt."
87text tlcheckb "Verify the example"
88text tlmsg4 "Publish this part"
89text tlmsg5 "Withdraw from the yard"
90text tlmsg6 "Withdrawn. This record is hidden from public routes. Copies already downloaded cannot be recalled."
91text tlmeta "<dl><dt>Author DID</dt><dd>"
92text tlmet2 "</dd><dt>Original source</dt><dd>"
93text tlmet3 "</dd><dt>License</dt><dd>"
94text tlmet4 "</dd><dt>Attribution</dt><dd>"
95text tlmet5 "</dd><dt>Revision SHA-256</dt><dd class=\"mono\">"
96text tlmet6 "</dd></dl>"
97text tlcodeh "<h2>Source</h2>"
98text tlexh "<h2>Declared example</h2><h3>Input</h3>"
99text tlexeh "<h3>Expected output</h3>"
100text tlproofh "<h2>Reproduction</h2><p>Download the exact record and receipt. The native replay tool validates the record hash, rebuilds from the pinned compiler, and checks this example in a fresh sandbox.</p>"
101text tlrawr "/record"
102text tlraws "/source.om"
103text tlrawi "/stdin"
104text tlrawe "/expected"
105text tlrawc "/receipt"
106text tlrecord "Exact source record"
107text tlmsg7 "Collector receipt"
108text tlmsg8 "Download source"
109text tlnosess "Sign in with your key to bring a build or create a part."
110text tlemptyy "The yard is waiting for its first public build. Unfinished is welcome."
111text tlmsg9 "The form was refused. Check the byte limits, required text, permission checkbox, and license. Duplicate fields and malformed text are not accepted."
112text tloff "The salvage workspace is not configured on this instance. No submission was saved."
113text tlbusy "The verifier is busy. Your draft is saved; retry after the current job finishes."
114text tlmsg10 "This action is not available for this revision. No publication was made."
115text tlbefore "before="
116text tlnextpg "Older submissions"
117text tlcss ".sl{max-width:950px;margin:auto}.sl h1{font-size:clamp(34px,5vw,60px);font-weight:450;letter-spacing:-.04em;line-height:1.1}.sl h2{font-weight:500;margin-top:36px}.sl .eyebrow{font:11px ui-monospace,monospace;letter-spacing:.15em;color:var(--mut)}.sl p{line-height:1.7;max-width:760px}.sl .sl-card{padding:24px;border:1px solid var(--line);border-radius:12px;margin:18px 0;background:var(--box)}.sl label{display:block;margin:20px 0;font-size:14px}.sl input:not([type=checkbox]),.sl select,.sl textarea{display:block;width:100%;max-width:100%;margin-top:8px;padding:12px;background:var(--bg);color:var(--fg);border:1px solid var(--line);border-radius:6px;font:inherit}.sl textarea{font:13px/1.65 ui-monospace,monospace}.sl small{display:block;color:var(--mut);font-weight:400}.sl button{padding:12px 18px;margin:10px 10px 10px 0}.sl button[value=source],.sl button[value=derive],.sl button[value=publish]{background:var(--acc);color:var(--bg)}.sl .sl-check{line-height:1.7}.sl .sl-check input{margin-right:10px}.sl dl{font-size:13px;overflow-wrap:anywhere}.sl dt{margin-top:12px;color:var(--mut)}.sl dd{margin:4px 0}.sl pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}.sl a{display:inline-block;margin:6px 16px 6px 0}.sl :focus-visible{outline:3px solid var(--acc);outline-offset:4px}\n"
118global glboot ulong 1
119fn slboot to bool
120if ne get glboot 0 0
121ret eq get glok 0 1
122end
123put glboot 0 1
124b = new uchar 1024 0
125for i ulong ulong envcnt bound 4096
126n = envread i b 0 1024
127if ge n long len tlenv
128same = true
129for j ulong len tlenv
130if ne get b j get tlenv j
131same = false
132end
133end
134if same
135if not slroot view part b len tlenv sub ulong n len tlenv
136ret false
137end
138ret slinit
139end
140end
141end
142ret false
143end
144fn slprefix to bool
145if lt get fpathl 0 8
146ret false
147end
148for i ulong 8
149if ne get fpath i get tlslash i
150ret false
151end
152end
153if eq get fpathl 0 8
154ret true
155end
156ret eq get fpath 8 47
157end
158fn slesc fld ulong to void
159for i ulong get gllen fld bound 16384
160fescc get glrec add get gloff fld i
161end
162end
163fn slown to bool
164who = get gscur 0
165if eq who 0
166ret false
167end
168n = get gssl who
169if ne n get gllen 0
170ret false
171end
172a = get gsso who
173b = get gloff 0
174for i ulong n bound 64
175if ne get gsstr add a i get glrec add b i
176ret false
177end
178end
179ret true
180end
181fn sladmin to bool
182who = get gscur 0
183if eq who 0
184ret false
185end
186n = get gssl who
187if ne n add len tldid len tfnid
188ret false
189end
190o = get gsso who
191for i ulong len tldid
192if ne get gsstr add o i get tldid i
193ret false
194end
195end
196o = add o len tldid
197for i ulong len tfnid
198if ne get gsstr add o i get tfnid i
199ret false
200end
201end
202ret true
203end
204fn slparentok to bool
205p = new uchar 64 0
206if ne get gllen 6 64
207ret false
208end
209n = slfield 6 p
210if not slknown p
211ret false
212end
213if ne slgetstate p 1
214ret false
215end
216if not slload p
217ret false
218end
219ret eq get glrec 8 1
220end
221fn slpubgate pubd bool receipt bool parent bool to bool
222ret and and pubd receipt parent
223end
224fn slpublic id view uchar * to bool
225if not slknown id
226ret false
227end
228if not slload id
229ret false
230end
231pubd = eq slgetstate id 1
232if eq get glrec 8 1
233ret pubd
234end
235if ne get glrec 8 2
236ret false
237end
238receipt = eq slreceiptget id 1
239ok = slparentok
240loaded = slload id
241ret slpubgate pubd receipt and ok loaded
242end
243fn slaccess id view uchar * to bool
244if not slknown id
245ret false
246end
247if not slload id
248ret false
249end
250if slown
251ret true
252end
253ret slpublic id
254end
255fn slhexbyte c uchar to bool
256ret or and ge c 48 le c 57 or and ge c 65 le c 70 and ge c 97 le c 102
257end
258fn slformvalid to bool
259n = get fbodyl 0
260i = ulong 0
261while lt i n bound 65536
262if eq get fbody i 37
263if lt sub n i 3
264ret false
265end
266if not slhexbyte get fbody add i 1
267ret false
268end
269if not slhexbyte get fbody add i 2
270ret false
271end
272i = add i 3
273else
274i = add i 1
275end
276end
277ret true
278end
279fn slgetform name view uchar * to long
280count = ulong 0
281i = ulong 0
282n = get fbodyl 0
283while lt i n bound 70000
284if cobfmat name i n
285count = add count 1
286end
287i = cobfnxt i n
288end
289if ne count 1
290ret -1
291end
292r = cobfld name
293if lt r 0
294ret r
295end
296note HTML form newlines are canonicalized once, before the immutable record is hashed.
297w = ulong 0
298skip = false
299for j ulong ulong r bound 65536
300c = get gcfv j
301if and skip eq c 10
302skip = false
303else
304skip = eq c 13
305if skip
306c = uchar 10
307end
308put gcfv w c
309w = add w 1
310end
311end
312put gcfvl 0 w
313if not cowutf8 w true
314ret -1
315end
316ret long w
317end
318fn slffeq name view uchar * want view uchar * to bool
319n = slgetform name
320if ne n long len want
321ret false
322end
323for i ulong len want bound 128
324if ne get gcfv i get want i
325ret false
326end
327end
328ret true
329end
330fn slffput fld ulong name view uchar * required bool to bool
331b = new uchar 16384 0
332n = slgetform name
333if lt n 0
334ret false
335end
336if and required eq n 0
337ret false
338end
339if gt ulong n slcap fld
340ret false
341end
342for i ulong ulong n bound 16384
343put b i get gcfv i
344end
345ret slput fld view part b 0 ulong n
346end
347fn slactor to bool
348b = new uchar 64 0
349who = get gscur 0
350if eq who 0
351ret false
352end
353n = get gssl who
354if gt n 64
355ret false
356end
357for i ulong n bound 64
358put b i get gsstr add get gsso who i
359end
360ret slput 0 view part b 0 n
361end
362fn sllicok to bool
363if slfeq 3 tlmit
364ret true
365end
366if slfeq 3 tlapache
367ret true
368end
369if slfeq 3 tlbsd
370ret true
371end
372ret slfeq 3 tlcc0
373end
374fn slredirect id view uchar * to long
375put fkind 0 2
376flocb
377floct tlslug
378floct id
379ret 303
380end
381fn slstore to long
382id = new uchar 64 0
383if not slquota
384ret soerr 507 tlquota
385end
386if ge get glidxn 0 4096
387ret soerr 507 tlquota
388end
389if not slsave
390ret soerr 503 tloff
391end
392for i ulong 64
393put id i get glrid i
394end
395if eq get glrec 8 1
396previous = slgetstate id
397if eq previous 2
398ret slredirect id
399end
400if eq previous 9
401ret soerr 503 tlmsg10
402end
403if not slsetstate id 1
404ret soerr 503 tloff
405end
406end
407ret slredirect id
408end
409fn slsubmit to long
410if not slffeq tlcons tlyes
411ret soerr 400 tlmsg9
412end
413slbegin 1
414if not slactor
415ret 403
416end
417if not slffput 1 tltitle true
418ret soerr 400 tlmsg9
419end
420if not slffput 2 tlorigin true
421ret soerr 400 tlmsg9
422end
423if not slffput 3 tllic true
424ret soerr 400 tlmsg9
425end
426if not sllicok
427ret soerr 400 tlmsg9
428end
429if not slffput 4 tldesc true
430ret soerr 400 tlmsg9
431end
432if not slffput 5 tlsource true
433ret soerr 400 tlmsg9
434end
435for i ulong 3
436x = slput add i 6 tlempty
437end
438if not slffput 9 tlcredit true
439ret soerr 400 tlmsg9
440end
441if not slffput 10 tllang true
442ret soerr 400 tlmsg9
443end
444x = slput 11 tlver
445ret slstore
446end
447fn slderive id view uchar * to long
448origin = new uchar 512 0
449lic = new uchar 64 0
450cred = new uchar 512 0
451if not slpublic id
452ret 404
453end
454if ne get glrec 8 1
455ret 400
456end
457if not slffeq tlcons tlyes
458ret soerr 400 tlmsg9
459end
460on = slfield 2 origin
461ln = slfield 3 lic
462cn = slfield 9 cred
463slbegin 2
464if not slactor
465ret 403
466end
467if not slffput 1 tltitle true
468ret soerr 400 tlmsg9
469end
470x = slput 2 view part origin 0 on
471x = slput 3 view part lic 0 ln
472if not slffput 4 tldesc true
473ret soerr 400 tlmsg9
474end
475if not slffput 5 tlsource true
476ret soerr 400 tlmsg9
477end
478x = slput 6 id
479if not slffput 7 tlstdin false
480ret soerr 400 tlmsg9
481end
482if not slffput 8 tlexpect false
483ret soerr 400 tlmsg9
484end
485x = slput 9 view part cred 0 cn
486x = slput 10 tlomega
487x = slput 11 tlver
488ret slstore
489end
490fn slpost id view uchar * to long
491r = sowpre
492if ne r 0
493ret r
494end
495soratev get gscur 0 get gsnow 0
496if not slformvalid
497ret soerr 400 tlmsg9
498end
499if ne slgetform tsfcsrf 32
500ret soerr 400 tlmsg9
501end
502if eq len id 0
503if not slffeq tlact tlsource
504ret 400
505end
506ret slsubmit
507end
508if slffeq tlact tlderive
509ret slderive id
510end
511if not slaccess id
512ret 404
513end
514if slffeq tlact tlwith
515if not or slown sladmin
516ret 403
517end
518if not slsetstate id 2
519ret 503
520end
521ret slredirect id
522end
523if not slown
524ret 403
525end
526if eq slgetstate id 2
527ret soerr 409 tlmsg10
528end
529if ne get glrec 8 2
530ret soerr 409 tlmsg10
531end
532if slffeq tlact tlverify
533if not sljobstart id
534ret soerr 503 tlbusy
535end
536ret slredirect id
537end
538if slffeq tlact tlpub
539if ne slreceiptget id 1
540ret soerr 409 tlmsg10
541end
542if not slparentok
543ret soerr 409 tlmsg10
544end
545if not slsetstate id 1
546ret 503
547end
548ret slredirect id
549end
550ret 400
551end
552fn sllink id view uchar * suffix view uchar * label view uchar * to void
553fput tlhref
554fputb
555fput tlslug
556fesc id
557fput suffix
558fput tlendh
559fput label
560fput tlenda
561end
562fn slform id view uchar * to void
563fput tlform1
564fputb
565fput tlslug
566fesc id
567fput tlform2
568socsrfout
569fput tlform3
570end
571fn slbutton value view uchar * label view uchar * to void
572fput tlbtn1
573fput value
574fput tlbtn2
575fput label
576fput tlbtn3
577end
578fn slnewform id view uchar * derived bool to void
579slform id
580fput tlfields
581if not derived
582fput tlmsg0
583end
584fput tlfcode
585if derived
586slesc 5
587end
588fput tlmsg1
589if derived
590fput tlfex
591end
592fput tlfcons
593if derived
594slbutton tlderive tlsavep
595else
596slbutton tlsource tlshared
597end
598fput tlforme
599end
600fn slnewpage to long
601fput tlbase
602fput tlh1
603fput tlnewh
604fput tlh1e
605if eq get gscur 0 0
606fput tlp
607fput tlnosess
608fput tlpe
609else
610slnewform tlempty false
611end
612fput tlclose
613ret 200
614end
615fn slbefore to ulong
616n = get fqsl 0
617if eq n 0
618ret get glidxn 0
619end
620if or lt n 8 gt n 12
621ret 5000
622end
623for i ulong len tlbefore
624if ne get fqs i get tlbefore i
625ret 5000
626end
627end
628v = ulong 0
629for i ulong sub n 7 bound 5
630c = get fqs add i 7
631if or lt c 48 gt c 57
632ret 5000
633end
634v = add mul v 10 ulong sub c 48
635end
636if gt v get glidxn 0
637ret 5000
638end
639ret v
640end
641fn slindex to long
642id = new uchar 64 0
643pos = slbefore
644if eq pos 5000
645ret 400
646end
647fput tlbase
648fput tlh1
649fput tlnewh
650fput tlh1e
651fput tlp
652fput tlliste
653fput tlpe
654sllink tlempty tlnewurl tlnewln
655shown = ulong 0
656for it ulong 32
657if eq pos 0
658break
659end
660pos = sub pos 1
661for i ulong 64
662put id i get glidx add mul pos 65 i
663end
664visible = slpublic id
665mine = false
666if not visible
667if slload id
668mine = slown
669end
670end
671if or visible mine
672fput tlcard
673if not visible
674if eq slgetstate id 2
675fput tlgone
676else
677fput tlpriv
678end
679end
680fput tlhref
681fputb
682fput tlslug
683fesc id
684fput tlendh
685slesc 1
686fput tlenda
687fput tlp
688slesc 4
689fput tlpe
690fput tlcarde
691shown = add shown 1
692end
693end
694if eq shown 0
695fput tlp
696fput tlemptyy
697fput tlpe
698end
699if gt pos 0
700fput tlhref
701fputb
702fput tlslug
703fput tlquery
704fnum pos
705fput tlendh
706fput tlnextpg
707fput tlenda
708end
709fput tlclose
710ret 200
711end
712fn slitem id view uchar * to long
713parentid = new uchar 64 0
714if not slaccess id
715ret 404
716end
717fput tlbase
718sllink tlempty tlempty2 tlback
719fput tlh1
720slesc 1
721fput tlh1e
722fput tlp
723slesc 4
724fput tlpe
725fput tlmeta
726slesc 0
727fput tlmet2
728slesc 2
729fput tlmet3
730slesc 3
731fput tlmet4
732slesc 9
733fput tlmet5
734fesc id
735fput tlmet6
736state = slgetstate id
737kind = get glrec 8
738if eq state 2
739fput tlp
740fput tlmsg6
741fput tlpe
742else
743if eq kind 2
744if not slpublic id
745fput tlp
746fput tlhidden
747fput tlpe
748end
749receipt = slreceiptget id
750fput tlcard
751if eq receipt 1
752fput tlpass
753else
754if eq receipt 2
755fput tlfail
756fput tlp
757slfailure
758fput tlpe
759else
760if sljobis id
761fput tlmsg3
762else
763fput tlmsg2
764end
765end
766end
767fput tlcarde
768cm_partln id
769if slown
770slform id
771slbutton tlverify tlcheckb
772if eq receipt 1
773if ne state 1
774slbutton tlpub tlmsg4
775end
776end
777fput tlforme
778end
779end
780if or slown sladmin
781slform id
782slbutton tlwith tlmsg5
783fput tlforme
784end
785end
786fput tlcodeh
787fput tlpre
788slesc 5
789fput tlpree
790sllink id tlraws tlmsg8
791if eq kind 2
792fput tlexh
793fput tlpre
794slesc 7
795fput tlpree
796fput tlexeh
797fput tlpre
798slesc 8
799fput tlpree
800fput tlproofh
801pn = slfield 6 parentid
802sllink view part parentid 0 pn tlempty tlparent
803sllink id tltarurl tlbundle
804sllink id tlrawr tlrecord
805sllink id tlrawc tlmsg7
806else
807if and eq state 1 ne get gscur 0 0
808fput tlh1
809fput tlmake
810fput tlh1e
811fput tlp
812fput tlmakep
813fput tlpe
814slnewform id true
815end
816end
817fput tlclose
818ret 200
819end
820fn slsuffix suffix view uchar * to bool
821if ne get fpathl 0 add 73 len suffix
822ret false
823end
824for i ulong len suffix bound 64
825if ne get fpath add i 73 get suffix i
826ret false
827end
828end
829ret true
830end
831fn slraw id view uchar * to long
832if not slaccess id
833ret 404
834end
835fsetcc tlno
836fsetcd tlattach
837fsetct tlplain
838put fkind 0 1
839fsetsbx
840if slsuffix tltarurl
841ret slbundle id
842end
843if slsuffix tlrawr
844fsetct tlbinary
845for i ulong get glrl 0 bound 32768
846fputc get glrec i
847end
848ret 200
849end
850if slsuffix tlrawc
851r = slreceiptget id
852if or eq r 0 eq r 9
853ret 404
854end
855fsetct tlbinary
856for i ulong 353
857fputc get glrcpt i
858end
859ret 200
860end
861fld = ulong 5
862if slsuffix tlrawi
863fld = ulong 7
864else
865if slsuffix tlrawe
866fld = ulong 8
867else
868if not slsuffix tlraws
869ret 404
870end
871end
872end
873for i ulong get gllen fld bound 16384
874fputc get glrec add get gloff fld i
875end
876ret 200
877end
878text tlnavl "salvage/\">Bring your build</a>"
879note slnav: the forge row entry (server/pages.om fhead), only while the store is switched on
880fn slnav to void
881if not slboot
882ret
883end
884fput tlhref
885fputb
886fput tlnavl
887end
888fn slroute to long
889id = new uchar 64 0
890if not slprefix
891ret 0
892end
893fsetcc tlno
894sljobpoll
895if not slboot
896ret soerr 503 tloff
897end
898if or fpeq tlslash fpeq tlrootp
899if eq get fmeth 0 3
900ret slpost tlempty
901end
902if not fget
903ret 405
904end
905ret slindex
906end
907if fpeq tlnewp
908if not fget
909ret 405
910end
911ret slnewpage
912end
913if lt get fpathl 0 73
914ret 404
915end
916for i ulong 64
917put id i get fpath add i 9
918end
919if not slhex id
920ret 404
921end
922if eq get fpathl 0 73
923if eq get fmeth 0 3
924ret slpost id
925end
926if not fget
927ret 405
928end
929ret slitem id
930end
931if not fget
932ret 405
933end
934ret slraw id
935end
936fn slfailure to void
937phase = get glrcpt 65
938if eq phase 1
939fput tlph1
940end
941if eq phase 2
942fput tlph2
943end
944if eq phase 3
945fput tlph3
946end
947if eq phase 4
948fput tlph4
949end
950if or eq phase 2 eq phase 3
951fput tlphx
952fnum ulong get glrcpt 66
953fput tlphs
954fnum ulong get glrcpt 67
955end
956end
957note sljobis: the queued verification job is this record
958fn sljobis id view uchar * to bool
959b = new uchar 64 0
960if not sljobid b
961ret false
962end
963ret sleq id b
964end