Commit Graph

7175 Commits

Author SHA1 Message Date
yosoyubik
1d91bb5e33 ames: first pass a %fine unit tests 2023-04-17 14:15:35 +02:00
Ted Blackman
9ce37f0d71
Merge pull request #6483 from urbit/pkova/fix-ames-load
ames: properly migrate old %snub tasks
2023-04-14 14:20:22 -04:00
Josh Lehman
1d1a81b90e
Merge pull request #6471 from urbit/pkova/fix-eyre-unacked
eyre: do not clear unacked events in +on-get-request
2023-04-14 11:14:29 -07:00
pkova
24f7f3549f ames: properly migrate old %snub tasks 2023-04-14 20:41:57 +03:00
yosoyubik
69a5c5e6df ames: factor out is-corked logic into a gate 2023-04-14 09:12:16 +02:00
Ted Blackman
f3d2df087a
Merge pull request #6463 from ashelkovnykov/json-new
zuse: changes in preparation for JSON jets
2023-04-13 11:58:55 -04:00
Joe Bryan
f8305dee4b Merge branch 'develop' into next/kelvin/413 2023-04-13 11:21:18 -04:00
silnem2
f2880ecc91 gen: rewrite +vats and add optional list of desks 2023-04-13 09:15:03 -06:00
silnem2
6a0f66b836 kiln: update +poke-suspend to use a list of desks 2023-04-13 08:40:14 -06:00
silnem2
36fb1303d3 gen: update |suspend to take a list of desks 2023-04-13 08:39:28 -06:00
silnem2
9cc1bec92d gen: remove +vat 2023-04-13 08:38:29 -06:00
yosoyubik
898ed99863 ames: no-op on naxplanation acks for corked bones 2023-04-13 08:53:01 +02:00
fang
171142fd31
eyre: use jam mime type for PUT mode detection
Making this consistent with the mime type used for GET requests.
2023-04-12 19:19:13 +02:00
fang
d32527ba19
eyre: further refactor +load logic
Co-authored by: joemfb <joemfb@gmail.com>
2023-04-12 18:53:44 +02:00
fang
132299f278
eyre, mar: use x-urb-jam mime type for jams 2023-04-12 18:42:35 +02:00
pkova
fa40fd7f35 eyre: do not clear unacked events in +on-get-request 2023-04-12 19:36:26 +03:00
~wicrum-wicrun
97c8e3833d ames: emit %miss on failed signature verification 2023-04-12 15:04:59 +02:00
yosoyubik
4c2bc332e0 Merge branch 'develop' into i/6451/reset-naxplanations 2023-04-12 06:49:57 +02:00
Alex Shelkovnykov
30044fbc1e Add jet hints 2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
e61d84d57b Replace +en:json:html code with cord version
Encode JSON to cord instead of tape. Code copied from @joemfb 's
version.
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
ac1a0ffdee Change JSON parser arms to match |base16:html 2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
28ed583d29 Fix bug in .en-json:html (missing escaped char)
The backspace character was not being escaped like other invisible
characters.
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
3537ef56c3 Fix JSON parser decoding for UTF8
JSON supports Unicode as both UTF8 sequences and escaped UTF16. UTF8 is
encoded as between 2 and 4 bytes, the first byte of which governs the
length. The JSON parser was previously accepting any non-ASCII bytes as
UTF8 in any order.

See:
- https://www.crockford.com/mckeeman.html
- https://www.json.org/json-en.html
- https://en.wikipedia.org/wiki/UTF-8#Encoding
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
1472dadf4d Add validation functions for UTF8 2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
3d93e9f527 Fix JSON parser decoding for escaped unicode
JSON supports Unicode as both UTF8 sequences and escaped UTF16. Unicode
points U+10000 to U+10FFFF are encoded as two consecutive escaped UTF16
units known as a surrogate pair. The JSON decoder was previously
treating surrogate pairs as two individual escaped UTF16 units. In
addition, the JSON standard allows hexadecimal letters to be either
uppercase or lowercase, which the parser was not respecting.

See:
- https://www.crockford.com/mckeeman.html
- https://www.json.org/json-en.html
- https://en.wikipedia.org/wiki/UTF-16#Code_points_from_U+010000_to_U+10FFFF

Git issue: #1776
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
e4ddd6994c Fix JSON parser decoding for ASCII in strings
The JSON standard rejects all un-escaped, un-printable characters EXCEPT
for the delete character (ID 127, i.e. 0x7F).

See: https://www.crockford.com/mckeeman.html
Via: https://www.json.org/json-en.html
2023-04-11 14:59:15 -06:00
Alex Shelkovnykov
2580dfbce3 Fix JSON parser decoding for numbers
\#1775
2023-04-11 14:59:15 -06:00
dr-frmr
0f4be5245e
ted/test.hoon: repair vestigial select-by-prefix feature 2023-04-11 15:55:13 -04:00
fang
4b68139c40
Merge branch 'next/kelvin/413' into x/json-bgon 2023-04-11 21:54:43 +02:00
Ted Blackman
365a1d5af9
Merge pull request #6447 from urbit/jb/drip-hurl
behn: propagate errors in deferred moves
2023-04-11 11:28:20 -04:00
yosoyubik
4840b2aed2 ames: simplify reset timer 2023-04-11 14:24:05 +02:00
yosoyubik
48a60d602c ames: reset timer for naxplanation on corked bones 2023-04-09 08:13:21 +02:00
yosoyubik
98a5ab9035 ames: fix handling of fine tasks for aliens 2023-04-08 06:34:10 +02:00
yosoyubik
538b0e920e Merge branch 'develop' into i/5788/remote-scry 2023-04-07 19:24:08 +02:00
yosoyubik
8744b1f4db ames: revert min tro to ~m2 2023-04-07 19:10:26 +02:00
Josh Lehman
af3ad860e7
Merge pull request #6454 from urbit/ted/arvo-bout
arvo: print module compilation times
2023-04-07 08:38:08 -07:00
Ted Blackman
b273f3091b arvo: print module compilation times 2023-04-06 23:52:53 -04:00
Joe Bryan
d2eda084ac
Merge branch 'develop' into ted/ames-ping-2 2023-04-06 15:07:38 -04:00
Ted Blackman
eddbe86d69 ames: fix syntax error 2023-04-06 11:58:34 -04:00
yosoyubik
ad69bc5e50 aqua: make compile for remote scry
(note: untested)
2023-04-06 16:28:18 +02:00
fang
e300fa2d6b
dill: exclude wrapped-task from most +call traces
Instead of including wrapped-task as-is in most call traces, we now only
include it in traces for crashing (harden task) calls. For everything
else, we include only the tag of the resulting $task.

Closes #6444.
2023-04-06 15:58:12 +02:00
yosoyubik
cf10ab4cc1 ames: fix +stale-flows 2023-04-06 14:17:02 +02:00
yosoyubik
2da5431ec2 ames: add minimal verbosity for |fine
This can be set with |ames-verb %fin. We might want to extend this
with a more granular logging system, probably similar to current ames
2023-04-06 13:44:45 +02:00
yosoyubik
9f45741a9a ames: use +update-qos:pe in fine core 2023-04-06 13:44:45 +02:00
yosoyubik
1c2b7667b1 ames: use |fi for remote scry |fine core 2023-04-06 13:44:45 +02:00
~wicrum-wicrun
5e248a2640 lull: properly register +on jet 2023-04-05 20:53:10 +02:00
~wicrum-wicrun
645f5e473a gall: only %x, %t and %z reserve [%$ *], for backwards compatibility 2023-04-05 20:51:04 +02:00
Ted Blackman
056ff35b89 app/ping: lower timeout to ~s25 2023-04-05 12:04:14 -04:00
Ted Blackman
66678acd3e ames: ping faster to sponsors 2023-04-05 11:59:06 -04:00
~wicrum-wicrun
db2ac2fa65 ames: update gall scries to use %x instead of %a 2023-04-05 16:23:38 +02:00
~wicrum-wicrun
447bfea9f8 lull: remove duplicate mop arms after merge 2023-04-05 16:23:12 +02:00
~wicrum-wicrun
f0cc9c34cd Merge branch 'ted/gall-user-scry' into i/5788/remote-scry 2023-04-05 15:00:24 +02:00
~wicrum-wicrun
93c1497431 gall: claim the [%$ *] namespace and relinquish the rest 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
9890e5b8da Revert "gall: add permissions to scry paths"
This reverts commit 6e542d4afe.
2023-04-05 14:59:59 +02:00
~wicrum-wicrun
45617df540 gall: add permissions to scry paths 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
8cd29cb8e7 gall: block when scrying into the future 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
cf6bbb87a0 gall: smear @da if binding to a path earlier than its latest binding 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
4b82b7b8d3 gall: return a cage instead of a cage of a page at %a scry 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
4f77f84e72 lull,gall: store $page instead of $noun in scry bindings 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
09be62ed8f lull,gall: add scry bindings to bowl 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
2071029ea2 lull,zuse: move +mop to lull 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
e6bd652366 gall: support %a scry at any date 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
93afa55167 gall: store date with each scry binding 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
94a4eca649 gall: support %t scry 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
8544c571bf gall: support %z scry 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
e8ae1ae86f gall: save highwater mark when nuking 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
9c560ece05 block when appropriate on %w scry 2023-04-05 14:59:59 +02:00
~wicrum-wicrun
9659e1c16b gall: block at %a scry if date isn't now 2023-04-05 14:59:58 +02:00
~wicrum-wicrun
ad7cf21d01 gall,lull: don't include $case in %grow 2023-04-05 14:59:58 +02:00
~wicrum-wicrun
42b5615f65 gall: simplify $neet definition 2023-04-05 14:59:58 +02:00
~wicrum-wicrun
7137f0de03 gall: implement %w scry 2023-04-05 14:59:58 +02:00
~wicrum-wicrun
e4ceed09ad gall: enforce monotonic growth of cases 2023-04-05 14:59:58 +02:00
~wicrum-wicrun
f0043aa4ec gall: support %a scries at the current time 2023-04-05 14:59:58 +02:00
Ted Blackman
31a2697260 gall: undo indent 2023-04-05 14:59:58 +02:00
Ted Blackman
e9e803b346 gall: add +trace to scry binding handlers 2023-04-05 14:59:58 +02:00
Ted Blackman
128375c4aa gall: handle scry moves locally 2023-04-05 14:59:58 +02:00
Ted Blackman
98f3e682bd gall: remove unused helpers 2023-04-05 14:59:58 +02:00
Ted Blackman
c69e71e83f lull,gall: switch to per-agent scry bindings 2023-04-05 14:59:58 +02:00
Ted Blackman
fc14b21815 gall: store scry paths in a +mop, not +map 2023-04-05 14:59:58 +02:00
Ted Blackman
b798ba2320 gall: +mo-cull compiles 2023-04-05 14:59:58 +02:00
Ted Blackman
3e6f4ed44a gall: check high-water mark 2023-04-05 14:59:58 +02:00
Ted Blackman
541f4725ae gall: +mo-tomb compiles 2023-04-05 14:59:58 +02:00
Ted Blackman
1aa7b8105d lull,gall: %grow compiles 2023-04-05 14:59:58 +02:00
~wicrum-wicrun
dec1bbbaff lib/test: use new scry format in +gall-scry-nonce 2023-04-05 14:34:42 +02:00
~wicrum-wicrun
78c9df828d gall: claim the [%$ *] namespace and relinquish the rest 2023-04-05 13:51:15 +02:00
~wicrum-wicrun
fb59992a50 Revert "gall: add permissions to scry paths"
This reverts commit 6e542d4afe.
2023-04-05 12:41:44 +02:00
yosoyubik
d137d78465 ames: remove |fi core
The entry point arms of |fi are moved to the |pe core and
|ke is now called directly so we avoid doing e.g. abed:ke:fi:peer
2023-04-05 10:27:47 +02:00
~wicrum-wicrun
6e542d4afe gall: add permissions to scry paths 2023-04-04 21:37:43 +02:00
Joe Bryan
b6194711c3 behn: hurl errors on %drip %crud 2023-04-04 15:07:27 -04:00
Joe Bryan
9ae28a985c clay: %pass %drip with context, expect and handle errors in +take 2023-04-04 15:06:51 -04:00
yosoyubik
08170068b0 ames: send a nack if there is not case for %pine
If the publisher can't produce a case for a given path,
it nacks the plea sent by the requester, that will then
produce a %miss to the vane that initiated the scry
2023-04-04 15:00:08 +02:00
yosoyubik
2691d02d28 spider: check thread cards to track remote scries 2023-04-04 14:44:36 +02:00
yosoyubik
d7df6bcce3 ames: fix pattern match check when sinking a %pine 2023-04-04 10:59:28 +02:00
midden-fabler
d8ad34f0fc update scry path listing 2023-04-04 03:06:22 -04:00
midden-fabler
bacbfd71ac add last-contact scry endpoint 2023-04-04 02:50:09 -04:00
yosoyubik
06a1f9aa27 ames: refactor unused on-pine flow for publishers 2023-04-04 08:28:43 +02:00
~wicrum-wicrun
c4d00e0073 gall: block when scrying into the future 2023-04-03 21:18:27 +02:00
~wicrum-wicrun
86df8f28f2 gall: smear @da if binding to a path earlier than its latest binding 2023-04-03 21:17:00 +02:00
~wicrum-wicrun
0aeed743af gall: return a cage instead of a cage of a page at %a scry 2023-04-03 20:21:31 +02:00
Ted Blackman
90970469d0
Merge pull request #6427 from playfulpachyderm/i/6426/expand-new-desk
arvo: add more files to |new-desk generator
2023-04-03 12:09:26 -04:00
~wicrum-wicrun
f46ec4d37b lull,gall: store $page instead of $noun in scry bindings 2023-04-03 16:10:57 +02:00
~wicrum-wicrun
13b6c2cdba lull,gall: add scry bindings to bowl 2023-04-03 15:39:11 +02:00
~wicrum-wicrun
14a7f863ed lull,zuse: move +mop to lull 2023-04-03 15:38:43 +02:00
yosoyubik
920c208a60 ames: fix on-pine 2023-04-03 12:48:16 +02:00
yosoyubik
dbac58827e spider: clean up remote scries on thread-done 2023-04-03 09:40:56 +02:00
yosoyubik
6c06fa16fa spider: support tracking/canceling scry requests
(%spider only tracks scry requests started by the -keen thread)
2023-04-03 09:18:51 +02:00
yosoyubik
d406344081 lull, ames: add %wham to cancel all scry requests
(we might want to add permissioning to restrict who can send %whams)
2023-04-01 09:20:49 +02:00
yosoyubik
55dffb59e7 ames: add all=? flag to fine %yawn task
if all=& in |yawn, it will delete all listeners ducts,
without notifying them about it, which seems bad,
so we migh adress that separatedly.

Also, it might be cleaner to have a separate task instead of
a flag, to have two paths for "remove me" and "remove all",
this way there won't be an option for a listener to remove all
others, and that will have to be handled explicitly.
2023-03-31 15:45:51 +02:00
~wicrum-wicrun
2b7245ddf3 gall: support %a scry at any date 2023-03-31 15:37:24 +02:00
~wicrum-wicrun
5d91b0bb0a gall: store date with each scry binding 2023-03-31 14:35:20 +02:00
yosoyubik
8387a28bd2 ames: use %$ to handle /pine pleas
Sending a %pine plea to an old publisher will result in
a crash because it:
- (pre remote-scry) handles only %cork pleas with %$ as the vane
- (pre GRQF) it doesn't handle %$ as the recipient vane
2023-03-31 11:37:05 +02:00
~wicrum-wicrun
8553108c9e gall: support %t scry 2023-03-31 00:20:22 +02:00
yosoyubik
80f01d06c5 dbug: return scry component
WIP this adds the minimal things we have in the scry-state of a peer.
Will revisit later on to present (more) information in a different way
2023-03-30 14:21:05 +02:00
~wicrum-wicrun
8f4a8e597f gall: support %z scry 2023-03-30 13:41:40 +02:00
yosoyubik
ece5393829 ames: add -pine thread 2023-03-30 13:39:44 +02:00
yosoyubik
27c83ea067 dbug: first pass at adding outgoing scries
(note: the frontend side is still WIP)
2023-03-30 11:49:21 +02:00
~wicrum-wicrun
6524e85d0c gall: save highwater mark when nuking 2023-03-29 20:28:36 +02:00
Alessio
38ace43ca0 arvo: change |new-desk to be minimal by default 2023-03-29 14:20:23 -03:00
Josh Lehman
fab329799f
Merge branch 'develop' into i/6297/vats 2023-03-29 08:43:07 -07:00
~wicrum-wicrun
4084fe0e5c block when appropriate on %w scry 2023-03-29 17:18:43 +02:00
~wicrum-wicrun
d8f5e53185 gall: block at %a scry if date isn't now 2023-03-29 16:15:00 +02:00
~wicrum-wicrun
d77d1ce615 gall,lull: don't include $case in %grow 2023-03-29 13:53:25 +02:00
~wicrum-wicrun
165ad4c2f7 gall: simplify $neet definition 2023-03-29 12:52:12 +02:00
lukechampine
e0ff3b4d5f eyre: add cache 2023-03-28 17:01:31 -04:00
~wicrum-wicrun
b1fd1fbab1 gall: implement %w scry 2023-03-28 21:45:14 +02:00
~wicrum-wicrun
fe6b675a6d gall: enforce monotonic growth of cases 2023-03-28 20:27:27 +02:00
~wicrum-wicrun
e7e7706c33 gall: support %a scries at the current time 2023-03-28 18:34:35 +02:00
Matthew LeVan
8749a0dac2
Merge pull request #6430 from urbit/fix-next-kelvin-ci
ci: fix `next/kelvin/*` workflows
2023-03-28 11:55:09 -04:00
yosoyubik
8cc9433f57 ames: use sys.kelvin as default in |keen 2023-03-28 13:43:15 +02:00
yosoyubik
8e54f7fcc3 ames: fix parsing fine timer wire 2023-03-28 13:40:10 +02:00
yosoyubik
f34e472bdd ames: fix faulty +abed, one more time 2023-03-28 12:35:23 +02:00
James D. Amberger
821f99a351 hood: options for +vats generator
This commit refactors `sur/hood.hoon` and changes the signature of the
`+vats` generator thus:

```hoon
|=  $:  [now=@da eny=@uvJ bec=beak]
        $@(~ [?(%suspended %running %blocking %nonexistent) ~])
        $:  verb=?
            show-suspended=?
            show-running=?
            show-blocking=?
            show-nonexistent=?
        ==
    ==
```

Called with a single positional argument, `+vats` will show only those
desks fitting the description given, while keyword parameters allow
finer-grained control over which desks are described. The `verb`
parameter determines whether the full load of desk information be shown,
or a subset thereof.

Resolves #6297.
2023-03-27 23:09:41 -04:00
Alessio
00b7ace08d arvo: add more files to |new-desk generator 2023-03-27 23:58:19 -03:00
yosoyubik
c9124e9fd0 ames: fix faulty bunted state in +abed 2023-03-25 16:58:03 +01:00
Pyry Kovanen
6d80191aef
Merge pull request #6417 from urbit/release/urbit-os-v2.136
Merge urbit-os-v2.136-rc2 back to develop
2023-03-24 21:51:17 +02:00
Pyry Kovanen
cb819b2091
Merge pull request #6413 from urbit/i/6407/zeal
clay: stop failed kelvin upgrades from retrying immediately
2023-03-24 18:36:09 +02:00
Philip Monk
89500460f7 clay: stop failed kelvin upgrades from retrying immediately
We were retrying failed kelvin upgrades as many times as we had apps
that needed to be suspended, because suspending an app triggers an
attempt to run the next kelvin upgrade.  This suspends all those apps in
one batch move, and then tries the next kelvin upgrade only once at the
end.

Fixes #6407

Partially addresses #6285
2023-03-24 18:19:48 +02:00
yosoyubik
140e5d2b5f ames: reorder |keen arms 2023-03-24 13:59:29 +01:00
yosoyubik
3269192b29 ames: remove mu/mi-trace 2023-03-24 12:44:20 +01:00
yosoyubik
ce02fecc41 ames: use +abed properly for |mi and |mu 2023-03-24 12:14:31 +01:00
~wicrum-wicrun
d76057cac7 ames: handle remote scry requests for gall data 2023-03-23 18:51:19 +01:00
Josh Lehman
2e5af921bb
Merge branch 'next/kelvin/413' into x/json-bgon 2023-03-23 08:35:57 -07:00
yosoyubik
439184fa7c ames: add +abed arms to peer-core 2023-03-23 12:54:22 +01:00
yosoyubik
d214fad1bd Revert "ames: make +abet pure"
This is stil a WIP and has not been tested so reverting commit
e4182f52a9.
2023-03-23 10:41:56 +01:00
yosoyubik
3c158b2491 ames: move etch-hunk out of the fine core 2023-03-23 10:19:54 +01:00
yosoyubik
8b0bd25a45 ames: rename keen-core -> ke 2023-03-23 06:45:14 +01:00
~wicrum-wicrun
f297762ab9 clay (and everything else) compiles 2023-03-22 23:24:55 +01:00
yosoyubik
2545e05c7a lull: implement +wyt for getting the size of a |deq 2023-03-22 12:26:50 +01:00
Ted Blackman
9772114f6f wip clay somewhat closer to compiling, but fails on hit.dom 2023-03-21 17:33:50 -06:00
Ted Blackman
03b3f75ae1 clay: dome->domo, compilation still fails though 2023-03-21 14:59:34 -06:00