From 312b06a0e286704b49f330c33f822f7410bdfcfb Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 6 Dec 2023 14:59:52 -0500 Subject: [PATCH 01/20] -make-glob: url encode clay built globs This isn't supposed to work, but the check in the runtime is faulty. We fix it here for backwards compatiblity. --- desk/ted/make-glob.hoon | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desk/ted/make-glob.hoon b/desk/ted/make-glob.hoon index b884bd2b..3e0312de 100644 --- a/desk/ted/make-glob.hoon +++ b/desk/ted/make-glob.hoon @@ -14,7 +14,12 @@ %+ turn paths |= pax=path ^- [path mime] - :- (slag (lent dir) pax) + :- + ?> ?=(^ pax) + %+ turn t.pax + |= seg=@t + ^- @t + (crip (en-urlt:html (trip seg))) =/ mar=mark (rear pax) =+ .^(vas=vase %cr (weld home pax)) =+ .^(=tube:clay %cc (weld home /[mar]/mime)) From 50fa744d5ce3961a39bf92db833c24f4c56a2adc Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 6 Dec 2023 15:00:48 -0500 Subject: [PATCH 02/20] %docket: handle both new and old url encoding cases Avoids having to force all third party developers to push new globs synchronously with this update. We simultaneously support unencoded and encoded paths by only url encoded if the unencoded path does not exist in the glob. --- desk/app/docket.hoon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desk/app/docket.hoon b/desk/app/docket.hoon index ae435be7..b9af11ef 100644 --- a/desk/app/docket.hoon +++ b/desk/app/docket.hoon @@ -712,7 +712,8 @@ ?: =(suffix /desk/js) %- inline-js-response (rap 3 'window.desk = "' u.des '";' ~) - =. suffix (turn suffix |=(s=@t (crip (en-urlt:html (trip s))))) + =? suffix !(~(has by glob) suffix) + (turn suffix |=(s=@t (crip (en-urlt:html (trip s))))) =/ requested ?: (~(has by glob) suffix) suffix /index/html From e1088e1e55b2374bb2c3c32d6cb27ad7e1c67897 Mon Sep 17 00:00:00 2001 From: Sidnym Ladrut Date: Mon, 8 Jan 2024 18:52:06 +0000 Subject: [PATCH 03/20] patch many minor issues with 'vitals/connection-check.hoon' thread * skip sponsor checks for galaxies (avoids a crash in /app/vitals/hoon) * mark peers unknown to %ames as %dead (avoids a crash in /ax/peers/...) * change thread input from @p to (unit @p) (allow calling from dojo) --- desk/app/vitals.hoon | 4 ++-- desk/ted/vitals/connection-check.hoon | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/desk/app/vitals.hoon b/desk/app/vitals.hoon index c536cfbf..42ef1f65 100644 --- a/desk/app/vitals.hoon +++ b/desk/app/vitals.hoon @@ -138,7 +138,7 @@ %landscape %vitals-connection-check %noun - !>(ship) + !>((some ship)) == ?: ?=(%pending -.status.u.stat) cor @@ -153,7 +153,7 @@ %landscape %vitals-connection-check %noun - !>(ship) + !>((some ship)) == :: :: public pokes diff --git a/desk/ted/vitals/connection-check.hoon b/desk/ted/vitals/connection-check.hoon index 3705f717..e856cff3 100644 --- a/desk/ted/vitals/connection-check.hoon +++ b/desk/ted/vitals/connection-check.hoon @@ -10,7 +10,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<(target=ship arg) +=+ !<([~ target=ship] arg) ;< our=@p bind:m get-our:io |^ :: early exit; check if we have live path to target @@ -33,7 +33,13 @@ :: set pending to %trying-local ;< ~ bind:m (update-status [%trying-local ~]) :: check if we can contact our own galaxy - ;< gqos=qos:ames bind:m (scry:io qos:ames ~[%gx %vitals %galaxy %vitals-qos]) + ;< gqos=qos:ames + bind:m + =/ mm (strand ,qos:ames) + ^- form:mm + ?: ?=(%czar (clan:title our)) + (pure:mm [%live *@da]) + (scry:io qos:ames ~[%gx %vitals %galaxy %vitals-qos]) ?. ?=(%live -.gqos) (post-result [%no-our-galaxy last-contact.gqos]) :: set pending to %trying-target @@ -104,12 +110,15 @@ ^- update:vitals [target now %pending pending] ++ get-qos - |= =ship + |= peer=ship =/ m (strand ,qos:ames) ^- form:m - ;< state=ship-state:ames - bind:m - (scry:io ship-state:ames ~[%ax %$ %peers (scot %p ship)]) + ;< peers=(map ship ?(%alien %known)) bind:m + (scry:io (map ship ?(%alien %known)) ~[%ax %$ %peers]) + ?. (~(has by peers) peer) + (pure:m [%dead *@da]) + ;< state=ship-state:ames bind:m + (scry:io ship-state:ames ~[%ax %$ %peers (scot %p peer)]) (pure:m (simplify-qos:lib-vitals state)) ++ galaxy-down |= galaxy=ship From b57ce3a7d9b753881af6816f1c09d906611f98c7 Mon Sep 17 00:00:00 2001 From: Sidnym Ladrut Date: Wed, 17 Jan 2024 20:37:18 +0000 Subject: [PATCH 04/20] update vitals infra to return most positive qos instead of crashing in edge cases --- desk/app/vitals.hoon | 7 +------ desk/lib/vitals.hoon | 9 +++++++++ desk/ted/vitals/connection-check.hoon | 16 ++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/desk/app/vitals.hoon b/desk/app/vitals.hoon index 42ef1f65..8d164937 100644 --- a/desk/app/vitals.hoon +++ b/desk/app/vitals.hoon @@ -160,10 +160,7 @@ :: %ship =+ !<(=ship vase) - ?< =(our ship) - ?< =(~ (find ~[our] (saxo:title our now ship))) - ?. ?=([%live *] (scry-qos:lib our now ship)) - !! + ?> ?=([%live *] (scry-qos:lib our now ship)) cor == ++ watch @@ -187,14 +184,12 @@ ?+ path [~ ~] :: [%x %sponsor ~] - ?< ?=(%czar (clan:title our)) %- some %- some :- %vitals-qos !> (scry-qos:lib our now (sein:title our now our)) :: [%x %galaxy ~] - ?< ?=(%czar (clan:title our)) %- some %- some :- %vitals-qos diff --git a/desk/lib/vitals.hoon b/desk/lib/vitals.hoon index d17d2ba9..da7489c8 100644 --- a/desk/lib/vitals.hoon +++ b/desk/lib/vitals.hoon @@ -11,6 +11,15 @@ ++ scry-qos |= [=ship =time peer=ship] ^- qos:ames + :: a ship is not guaranteed by %ames to know itself, so we fake it + ?: =(ship peer) + [%live time] + :: .^(* %ax /=//=/peers/[peer]) crashes if the peer is unknown, so we + :: check the source map beforehand and fake an %unborn if we can see + :: a crash coming + =/ peers .^((map ^ship ?(%alien %known)) ~[%ax %$ %peers]) + ?. (~(has by peers) peer) + [%unborn time] %- simplify-qos .^ ship-state:ames %ax diff --git a/desk/ted/vitals/connection-check.hoon b/desk/ted/vitals/connection-check.hoon index e856cff3..b1e25972 100644 --- a/desk/ted/vitals/connection-check.hoon +++ b/desk/ted/vitals/connection-check.hoon @@ -12,9 +12,9 @@ ^- form:m =+ !<([~ target=ship] arg) ;< our=@p bind:m get-our:io +;< now=@da bind:m get-time:io |^ :: early exit; check if we have live path to target - ;< now=@da bind:m get-time:io ;< tqos=qos:ames bind:m (get-qos target) ?: ?& ?=(%live -.tqos) (gth last-contact.tqos (sub now info-timeout:vitals)) @@ -33,13 +33,7 @@ :: set pending to %trying-local ;< ~ bind:m (update-status [%trying-local ~]) :: check if we can contact our own galaxy - ;< gqos=qos:ames - bind:m - =/ mm (strand ,qos:ames) - ^- form:mm - ?: ?=(%czar (clan:title our)) - (pure:mm [%live *@da]) - (scry:io qos:ames ~[%gx %vitals %galaxy %vitals-qos]) + ;< gqos=qos:ames bind:m (scry:io qos:ames ~[%gx %vitals %galaxy %vitals-qos]) ?. ?=(%live -.gqos) (post-result [%no-our-galaxy last-contact.gqos]) :: set pending to %trying-target @@ -102,21 +96,23 @@ |= =pending:vitals =/ m (strand ,~) ^- form:m - ;< now=@da bind:m get-time:io %+ poke-our:io %vitals :- %update-status !> ^- update:vitals [target now %pending pending] +:: thread version of +scry-qos in /=landscape=/lib/vitals/hoon ++ get-qos |= peer=ship =/ m (strand ,qos:ames) ^- form:m + ?: =(our peer) + (pure:m [%live now]) ;< peers=(map ship ?(%alien %known)) bind:m (scry:io (map ship ?(%alien %known)) ~[%ax %$ %peers]) ?. (~(has by peers) peer) - (pure:m [%dead *@da]) + (pure:m [%unborn now]) ;< state=ship-state:ames bind:m (scry:io ship-state:ames ~[%ax %$ %peers (scot %p peer)]) (pure:m (simplify-qos:lib-vitals state)) From 9689b802dd170bd6863e082a163a9cf89c7c8b5f Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Mon, 22 Jan 2024 16:16:55 -0500 Subject: [PATCH 05/20] docket: fix handling of multi-dot files --- desk/app/docket.hoon | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/desk/app/docket.hoon b/desk/app/docket.hoon index b9af11ef..810bf742 100644 --- a/desk/app/docket.hoon +++ b/desk/app/docket.hoon @@ -481,6 +481,8 @@ ++ handle-http-request |= [eyre-id=@ta inbound-request:eyre] ^- (quip card _state) + ~& authenticated/authenticated + ~& args/+< :: =; [payload=simple-payload:http caz=(list card) =_state] :_ state @@ -671,15 +673,17 @@ ++ split-at =| fst=tape |= [=tape char=@tD] + =. tape (flop tape) + |- ^+ [fst fst] - ?~ tape [fst tape] + ?~ tape [(flop fst) (flop tape)] ?: =(i.tape char) - [fst t.tape] + [(flop fst) (flop t.tape)] $(tape t.tape, fst (snoc fst i.tape)) :: ++ fip |= fil=@t - =/ [fil=tape ext=tape] (split-at (trip fil) '.') + =/ [ext=tape fil=tape] (split-at (trip fil) '.') =- (snoc - (crip ext)) %+ turn (scan fil (most fas (star ;~(less fas next)))) From cc3384c4221bc95fc57301cadfe2036ff29b5623 Mon Sep 17 00:00:00 2001 From: Sidnym Ladrut Date: Tue, 23 Jan 2024 02:55:35 +0000 Subject: [PATCH 06/20] improve time accuracy of vitals thread reports; fix bug in /lib/vitals/hoon scry path --- desk/lib/vitals.hoon | 17 +++++------------ desk/ted/vitals/connection-check.hoon | 4 +++- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/desk/lib/vitals.hoon b/desk/lib/vitals.hoon index da7489c8..8e1d916e 100644 --- a/desk/lib/vitals.hoon +++ b/desk/lib/vitals.hoon @@ -14,20 +14,13 @@ :: a ship is not guaranteed by %ames to know itself, so we fake it ?: =(ship peer) [%live time] - :: .^(* %ax /=//=/peers/[peer]) crashes if the peer is unknown, so we + :: .^(* /ax/=//=/peers/[peer]) crashes if the peer is unknown, so we :: check the source map beforehand and fake an %unborn if we can see :: a crash coming - =/ peers .^((map ^ship ?(%alien %known)) ~[%ax %$ %peers]) + =/ ames-peers=path /ax/(scot %p ship)//(scot %da time)/peers + =/ peers .^((map ^ship ?(%alien %known)) ames-peers) ?. (~(has by peers) peer) [%unborn time] - %- simplify-qos - .^ ship-state:ames - %ax - (scot %p ship) - %$ - (scot %da time) - %peers - (scot %p peer) - ~ - == + =/ pqos .^(ship-state:ames (snoc ames-peers (scot %p peer))) + (simplify-qos pqos) -- diff --git a/desk/ted/vitals/connection-check.hoon b/desk/ted/vitals/connection-check.hoon index b1e25972..7550c644 100644 --- a/desk/ted/vitals/connection-check.hoon +++ b/desk/ted/vitals/connection-check.hoon @@ -12,10 +12,10 @@ ^- form:m =+ !<([~ target=ship] arg) ;< our=@p bind:m get-our:io -;< now=@da bind:m get-time:io |^ :: early exit; check if we have live path to target ;< tqos=qos:ames bind:m (get-qos target) + ;< now=@da bind:m get-time:io ?: ?& ?=(%live -.tqos) (gth last-contact.tqos (sub now info-timeout:vitals)) == @@ -96,6 +96,7 @@ |= =pending:vitals =/ m (strand ,~) ^- form:m + ;< now=@da bind:m get-time:io %+ poke-our:io %vitals :- %update-status @@ -107,6 +108,7 @@ |= peer=ship =/ m (strand ,qos:ames) ^- form:m + ;< now=@da bind:m get-time:io ?: =(our peer) (pure:m [%live now]) ;< peers=(map ship ?(%alien %known)) bind:m From adb321ae18442f4377014f9ce12d585cba943c58 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 23 Jan 2024 09:38:04 -0500 Subject: [PATCH 07/20] docket: fix sigpam --- desk/app/docket.hoon | 1 - 1 file changed, 1 deletion(-) diff --git a/desk/app/docket.hoon b/desk/app/docket.hoon index 810bf742..2eefca1f 100644 --- a/desk/app/docket.hoon +++ b/desk/app/docket.hoon @@ -482,7 +482,6 @@ |= [eyre-id=@ta inbound-request:eyre] ^- (quip card _state) ~& authenticated/authenticated - ~& args/+< :: =; [payload=simple-payload:http caz=(list card) =_state] :_ state From a8422fa5d4f6c1c941047a9c757ea20019cc61ca Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 30 Jan 2024 11:03:44 -0600 Subject: [PATCH 08/20] docket: remove errant log --- desk/app/docket.hoon | 1 - 1 file changed, 1 deletion(-) diff --git a/desk/app/docket.hoon b/desk/app/docket.hoon index 2eefca1f..9fd59d67 100644 --- a/desk/app/docket.hoon +++ b/desk/app/docket.hoon @@ -481,7 +481,6 @@ ++ handle-http-request |= [eyre-id=@ta inbound-request:eyre] ^- (quip card _state) - ~& authenticated/authenticated :: =; [payload=simple-payload:http caz=(list card) =_state] :_ state From adc4fddca392c5936187bc00be4d0a805fceb103 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 30 Jan 2024 12:01:59 -0600 Subject: [PATCH 09/20] ops: fixing bad yml --- .github/workflows/deploy-kernel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-kernel.yml b/.github/workflows/deploy-kernel.yml index 47585e37..b2251645 100644 --- a/.github/workflows/deploy-kernel.yml +++ b/.github/workflows/deploy-kernel.yml @@ -7,7 +7,6 @@ on: required: false default: develop description: Enter the tag to deploy - default: staging jobs: build-frontend: runs-on: ubuntu-latest From 480d88c6b4602e3dac382de4e40b50d5d8a18461 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 13 Feb 2024 16:59:40 +0100 Subject: [PATCH 10/20] docket: call +fip appropriately It's no longer a parser, so stop calling as like such. --- desk/app/docket.hoon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desk/app/docket.hoon b/desk/app/docket.hoon index 06cfeb22..5f37d8c2 100644 --- a/desk/app/docket.hoon +++ b/desk/app/docket.hoon @@ -656,17 +656,16 @@ ?~ file [glob 'file without filename' err] ?~ type [glob (cat 3 'file without type: ' u.file) err] ?^ code [glob (cat 3 'strange encoding: ' u.code) err] - =/ filp (rush u.file fip) - ?~ filp [glob (cat 3 'strange filename: ' u.file) err] + =/ filp (fip u.file) :: ignore metadata files and other "junk" ::TODO consider expanding coverage :: - ?: =('.DS_Store' (rear `path`u.filp)) + ?: =('DS_Store' (rear filp)) [glob err] :: make sure to exclude the top-level dir from the path :: :_ err - %+ ~(put by glob) (slag 1 `path`u.filp) + %+ ~(put by glob) (slag 1 filp) [u.type (as-octs:mimes:html body)] :: ++ split-at @@ -682,6 +681,7 @@ :: ++ fip |= fil=@t + ^- path =/ [ext=tape fil=tape] (split-at (trip fil) '.') =- (snoc - (crip ext)) %+ turn From 505af2fb559da7c42b9135f3daf6a0236235f86b Mon Sep 17 00:00:00 2001 From: fang Date: Thu, 7 Mar 2024 16:26:56 +0100 Subject: [PATCH 11/20] ops: true 411 kelvin compat We're going to want to pull in the new /lib/strandio, which we need to be able to build. The signature for %keen changed, so the old /lib/strandio no longer compiles. If we had a custom version of /lib/strandio that excluded the +keen arms, we could be 412-411 cross-compatible... --- desk/sys.kelvin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desk/sys.kelvin b/desk/sys.kelvin index 87ac69c7..fe16daf9 100644 --- a/desk/sys.kelvin +++ b/desk/sys.kelvin @@ -1 +1 @@ -[%zuse 412] \ No newline at end of file +[%zuse 411] \ No newline at end of file From 1dd799c6ef5324bce66aa41b4db1a0b664506a54 Mon Sep 17 00:00:00 2001 From: fang Date: Thu, 7 Mar 2024 18:05:19 +0100 Subject: [PATCH 12/20] ops: cross-compat --- desk/sys.kelvin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desk/sys.kelvin b/desk/sys.kelvin index fe16daf9..d641b028 100644 --- a/desk/sys.kelvin +++ b/desk/sys.kelvin @@ -1 +1,2 @@ -[%zuse 411] \ No newline at end of file +[%zuse 412] +[%zuse 411] From dcd6ac0dba3e3733552fae2d847d9484f80161a8 Mon Sep 17 00:00:00 2001 From: bacwyls Date: Mon, 11 Mar 2024 11:24:44 -0500 Subject: [PATCH 13/20] fix %radio icon --- ui/src/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/constants.ts b/ui/src/constants.ts index c9dfa5c9..f4865c89 100644 --- a/ui/src/constants.ts +++ b/ui/src/constants.ts @@ -187,11 +187,11 @@ export const APPS = [ { title: 'radio', description: 'an app for urbit disc jockeys', - color: '#FF0000', + color: '#FFFFFF', link: '/apps/radio', section: SECTIONS.FUN, desk: 'radio', source: '~nodmyn-dosrux', - image: 'https://0x0.st/o4--.png', + image: 'https://bwyl.nyc3.digitaloceanspaces.com/radio/radio.png', }, ]; From 736386bc8dd52adbdcbd748ef20d29650428574a Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 12 Mar 2024 01:54:09 +0000 Subject: [PATCH 14/20] update glob: [skip actions] --- desk/desk.docket-0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desk/desk.docket-0 b/desk/desk.docket-0 index c28faed8..73d95c5c 100644 --- a/desk/desk.docket-0 +++ b/desk/desk.docket-0 @@ -1,7 +1,7 @@ :~ title+'Landscape' info+'An app launcher for Urbit.' color+0xee.5432 - glob-http+['https://bootstrap.urbit.org/glob-0v7.c3mlj.gm8sb.1cmkv.ugntt.pg185.glob' 0v7.c3mlj.gm8sb.1cmkv.ugntt.pg185] + glob-http+['https://bootstrap.urbit.org/glob-0v3.7feub.ojfhc.rvb86.8d51j.7n9nh.glob' 0v3.7feub.ojfhc.rvb86.8d51j.7n9nh] ::glob-ames+~zod^0v0 base+'landscape' version+[1 20 0] From ca63cf37964ea1ba4e5acf6d0161b35fa1c836cc Mon Sep 17 00:00:00 2001 From: pkova Date: Thu, 14 Mar 2024 23:45:18 +0200 Subject: [PATCH 15/20] vitals: fix vitals to support 411 informal pings --- desk/sur/vitals.hoon | 13 +++++++++++++ desk/ted/vitals/connection-check.hoon | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/desk/sur/vitals.hoon b/desk/sur/vitals.hoon index 734a4dee..f9e305dc 100644 --- a/desk/sur/vitals.hoon +++ b/desk/sur/vitals.hoon @@ -41,4 +41,17 @@ $: =ship =result == +:: ++$ ping + $: version=@ + ships=(set ship) + nonce=@ud + $= plan + $~ [%nat ~] + $% [%nat ~] + [%pub ip=(unit @t)] + [%off ~] + [%one ~] + == + == -- diff --git a/desk/ted/vitals/connection-check.hoon b/desk/ted/vitals/connection-check.hoon index 7550c644..79b2a45d 100644 --- a/desk/ted/vitals/connection-check.hoon +++ b/desk/ted/vitals/connection-check.hoon @@ -33,8 +33,9 @@ :: set pending to %trying-local ;< ~ bind:m (update-status [%trying-local ~]) :: check if we can contact our own galaxy + ;< =ping:vitals bind:m (scry:io ping:vitals ~[%gx %ping %noun]) ;< gqos=qos:ames bind:m (scry:io qos:ames ~[%gx %vitals %galaxy %vitals-qos]) - ?. ?=(%live -.gqos) + ?: &(!=(%live -.gqos) !=(%off -.plan.ping)) (post-result [%no-our-galaxy last-contact.gqos]) :: set pending to %trying-target ;< ~ bind:m (update-status [%trying-target ~]) From b0db4676f1d64c066193f6456231b051a6eb411f Mon Sep 17 00:00:00 2001 From: pkova Date: Wed, 20 Mar 2024 15:55:07 +0200 Subject: [PATCH 16/20] vitals: support /app/ping state %3 --- desk/sur/vitals.hoon | 44 +++++++++++++++++++----- desk/ted/vitals/connection-check.hoon | 49 ++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 18 deletions(-) diff --git a/desk/sur/vitals.hoon b/desk/sur/vitals.hoon index f9e305dc..1c986697 100644 --- a/desk/sur/vitals.hoon +++ b/desk/sur/vitals.hoon @@ -42,16 +42,42 @@ =result == :: ++$ ship-state + $% [%idle ~] + [%poking ~] + [%http until=@da] + [%waiting until=@da] + == +:: +$ ping - $: version=@ - ships=(set ship) - nonce=@ud - $= plan - $~ [%nat ~] - $% [%nat ~] - [%pub ip=(unit @t)] - [%off ~] - [%one ~] + $% [%0 ships=(map ship [=rift =ship-state])] + $: %1 + ships=(set ship) + nonce=@ud + $= plan + $~ [%nat ~] + $% [%nat ~] + [%pub ip=(unit @t)] + == + == + :: + $: %2 + ships=(set ship) + nonce=@ud + $= plan + $~ [%nat ~] + $% [%nat ~] + [%pub ip=(unit @t)] + [%off ~] + [%one ~] + == == + :: + $: %3 + mode=?(%formal %informal) + pokes=@ud + timer=(unit [=wire date=@da]) + galaxy=@p + == == -- diff --git a/desk/ted/vitals/connection-check.hoon b/desk/ted/vitals/connection-check.hoon index 79b2a45d..52b7515a 100644 --- a/desk/ted/vitals/connection-check.hoon +++ b/desk/ted/vitals/connection-check.hoon @@ -35,7 +35,7 @@ :: check if we can contact our own galaxy ;< =ping:vitals bind:m (scry:io ping:vitals ~[%gx %ping %noun]) ;< gqos=qos:ames bind:m (scry:io qos:ames ~[%gx %vitals %galaxy %vitals-qos]) - ?: &(!=(%live -.gqos) !=(%off -.plan.ping)) + ?: !(galaxy-reachable ping gqos) (post-result [%no-our-galaxy last-contact.gqos]) :: set pending to %trying-target ;< ~ bind:m (update-status [%trying-target ~]) @@ -46,23 +46,30 @@ :: if we're a moon, check if we can contact our planet :: :: NN: failing to contact our sponsor is only a failure condition for moons, - :: since currently only moons receive additional routing help from their - :: sponsors + :: since currently only moons require the direct sponsor to be online for + :: peers to grab the moon keys :: NN: we do this after the initial target check because if we're a moon and :: our planet is down, it's useful to talk to ships that still have live :: wires (e.g. for troubleshooting); thus, by waiting to perform this :: check, we don't report %no-our-planet for every connectivity check :: when attempting to track down a live peer from whom to seek help :: - ;< sqos=qos:ames + ;< moon-sponsor-reachable=? bind:m - =/ mm (strand ,qos:ames) + =/ mm (strand ,?) ^- form:mm ?. ?=(%earl (clan:title our)) - (pure:mm [%live *@da]) - (scry:io qos:ames ~[%gx %vitals %sponsor %vitals-qos]) - ?. ?=(%live -.sqos) - (post-result [%no-our-planet last-contact.sqos]) + (pure:mm %.y) + =/ sponsor=@p (end 5 our) + ;< ~ bind:mm (update-status [%trying-sponsor sponsor]) + ;< pchek=(unit) bind:mm (check-online sponsor target-timeout:vitals) + ?: ?=([%$ %$] pchek) + (pure:mm %.y) + (pure:mm %.n) + :: + ?: !moon-sponsor-reachable + ;< pqos=qos:ames bind:m (scry:io qos:ames ~[%gx %vitals %sponsor %vitals-qos]) + (post-result [%no-our-planet last-contact.pqos]) :: early exit; if target is a galaxy, there's nothing more we can check ?: ?=(%czar (clan:title target)) (galaxy-down target) @@ -93,6 +100,30 @@ ?: u.live [%no-sponsor-hit i.sponsors] [%no-sponsor-miss i.sponsors] +:: +++ galaxy-reachable + |= [=ping:vitals =qos:ames] + ^- ? + ?- -.ping + %0 + ?=(%live -.qos) + :: + %1 + ?: ?=(%pub -.plan.ping) + %.y + ?=(%live -.qos) + :: + %2 + ?. ?=(%nat -.plan.ping) + %.y + ?=(%live -.qos) + :: + %3 + ?: ?=(%informal mode.ping) + %.y + ?=(%live -.qos) + == +:: ++ update-status |= =pending:vitals =/ m (strand ,~) From 5fb784b995c6c9fa836cc0dff38de558b96e08ab Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 26 Mar 2024 13:00:25 -0500 Subject: [PATCH 17/20] notifications: remove filtering of dms --- ui/src/nav/notifications/useNotifications.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ui/src/nav/notifications/useNotifications.ts b/ui/src/nav/notifications/useNotifications.ts index cc43c4b3..dde152db 100644 --- a/ui/src/nav/notifications/useNotifications.ts +++ b/ui/src/nav/notifications/useNotifications.ts @@ -50,15 +50,10 @@ export const useNotifications = (mentionsOnly = false) => { }; } - const notDmsFromGroupsDesk = (s: Skein) => - !((isDM(s.top.rope) || isClub(s.top.rope)) && isGroups(s.top.rope)); - - const unreads = skeins - .filter((s) => s.unread) - .filter((s) => notDmsFromGroupsDesk(s)); - const filteredSkeins = skeins - .filter((s) => (mentionsOnly ? isMention(s.top) : s)) - .filter((s) => notDmsFromGroupsDesk(s)); + const unreads = skeins.filter((s) => s.unread); + const filteredSkeins = skeins.filter((s) => + mentionsOnly ? isMention(s.top) : s + ); return { notifications: groupSkeinsByDate(filteredSkeins), From 978a45386b66d0625e3ffed728d61899b738b3ba Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 26 Mar 2024 18:07:47 +0000 Subject: [PATCH 18/20] update glob: [skip actions] --- desk/desk.docket-0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desk/desk.docket-0 b/desk/desk.docket-0 index 73d95c5c..6d16152d 100644 --- a/desk/desk.docket-0 +++ b/desk/desk.docket-0 @@ -1,7 +1,7 @@ :~ title+'Landscape' info+'An app launcher for Urbit.' color+0xee.5432 - glob-http+['https://bootstrap.urbit.org/glob-0v3.7feub.ojfhc.rvb86.8d51j.7n9nh.glob' 0v3.7feub.ojfhc.rvb86.8d51j.7n9nh] + glob-http+['https://bootstrap.urbit.org/glob-0v3.0dqi8.1csij.8dv08.lhglb.45fpk.glob' 0v3.0dqi8.1csij.8dv08.lhglb.45fpk] ::glob-ames+~zod^0v0 base+'landscape' version+[1 20 0] From 65294597da1f75a6824cb8f7d2485955864482de Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 26 Mar 2024 21:09:03 +0100 Subject: [PATCH 19/20] docket: suspend the %garden desk It was deprecated in favor of %landscape, but is still active on people's ships and blocking the 411 update. Here, we make docket suspend the %garden desk unconditionally. Debated deferring this to a separate event, since it may kick off the base update, but the suspension itself should isolate that into its own separate event already. --- desk/app/docket.hoon | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/desk/app/docket.hoon b/desk/app/docket.hoon index a4596758..3de8d4ac 100644 --- a/desk/app/docket.hoon +++ b/desk/app/docket.hoon @@ -3,7 +3,7 @@ |% +$ card card:agent:gall +$ app-state - $: %4 + $: %5 :: local charges=(map desk charge) == @@ -65,13 +65,18 @@ ?. ?=(%3 -.old) `old :_ old(- %4) :_ ~ [%pass /reinstall %agent [our.bowl dap.bowl] %poke %reinstall-groups !>(~)] - ?> ?=(%4 -.old) + =^ cards-4 old + ?. ?=(%4 -.old) `old + :_ old(- %5) :_ ~ + =/ =cage [%kiln-suspend !>(`desk`%garden)] + [%pass /suspend %agent [our.bowl %hood] %poke cage] + ?> ?=(%5 -.old) =/ cards-tire [~(tire pass /tire) ~] =. -.state old :: inflate-cache needs to be called after the state is set :: =. +.state inflate-cache - [:(weld cards-1 cards-2 cards-3 cards-tire) this] + [:(weld cards-1 cards-2 cards-3 cards-4 cards-tire) this] :: ++ inflate-cache ^- cache @@ -87,9 +92,11 @@ state-1 state-2 state-3 + state-4 app-state == :: + +$ state-4 [%4 (map desk charge)] +$ state-3 [%3 (map desk charge)] +$ state-2 [%2 (map desk charge)] +$ state-1 [%1 (map desk charge)] @@ -250,6 +257,7 @@ [%kiln ~] `state [%charge @ *] (take-charge i.t.wire t.t.wire) [%reinstall *] `state + [%suspend ~] `state == [cards this] :: @@ -674,8 +682,8 @@ ;: cook |=(pork (weld q (drop p))) deft - |=(a=cord (rash a (more fas smeg))) - crip + |=(a=cord (rash a (more fas smeg))) + crip (star ;~(pose (cold '%20' (just ' ')) next)) == :: From 01be49105dac29a6e66d5e3d2302409b3a112b00 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 26 Mar 2024 15:55:19 -0500 Subject: [PATCH 20/20] ops: version bump --- desk/desk.docket-0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desk/desk.docket-0 b/desk/desk.docket-0 index 6d16152d..d74552a3 100644 --- a/desk/desk.docket-0 +++ b/desk/desk.docket-0 @@ -4,7 +4,7 @@ glob-http+['https://bootstrap.urbit.org/glob-0v3.0dqi8.1csij.8dv08.lhglb.45fpk.glob' 0v3.0dqi8.1csij.8dv08.lhglb.45fpk] ::glob-ames+~zod^0v0 base+'landscape' - version+[1 20 0] + version+[1 24 0] website+'https://tlon.io' license+'MIT' ==