fix(memory): let the family write to the vault again after a token expires - #55
Conversation
…pires
Ticking off a todo from chat failed with a 401 and no restart helped.
Two causes, both invisible from the outside.
The write seam still addressed Forgejo by the LAN address `{code_url}`
renders for phones, so every host-side write went to whatever IP the
Mac had when it was installed. Writes now go to loopback like the rest
of the host plane.
The token was worse: minted once during install and only ever read
afterwards, so when Forgejo expired it nothing held a newer one, and
re-pointing the remote rewrote the dead token every start. A token
Forgejo rejects is now replaced with a freshly issued one. Only a
rejected credential triggers that -- an unreachable Forgejo is left
alone, so a slow cold start cannot burn a good token.
|
Verified on the demo rig, which was sitting in exactly this state (401 on every write, The shipped hook repaired it rather than a hand-patch: Then the full loop, including through Stacky's container shim (agent → The loopback test asserts where the request lands, not what the code says: the config names TEST-NET-1 ( Unit lane: 2155 passed, 8 skipped. ruff clean. Known gap, not addressed here: there is still no dirty-working-tree guard before the rebase/reset paths added in #54. Host CLI writes and the curator share one working copy with no lock, so an uncommitted vault edit can be lost to a |
Ticking off a todo from chat failed with a 401 and no restart helped.
Two causes. The write seam (
update_memory) still addressed Forgejo by the LAN address{code_url}renders for phones, so every host-side write went to whatever IP the Mac had at install time; #54 fixed five call sites and missed this one. And the write token is minted once during install and only ever read afterwards, so once Forgejo expired it nothing held a newer one and re-pointing the remote rewrote the dead token every start.Writes now go to loopback like the rest of the host plane, and a token Forgejo rejects is replaced with a freshly issued one. Only a rejected credential triggers a reissue, so a slow cold start cannot burn a good token.
Follows #54.