host: the answeredBy key is the host's alone #85

Merged
mikluko merged 2 commits from host-strip-answeredby into main 2026-11-16 10:36:37 +00:00
Owner

specs-58's follow-up to #83: see takes _meta.roomcity out of a permission request it does not answer, so only a request the host answers carries answeredBy. Test in ownperm_test.go (the rest of _meta and the id stay).

specs-58's follow-up to #83: `see` takes `_meta.roomcity` out of a permission request it does not answer, so only a request the host answers carries `answeredBy`. Test in `ownperm_test.go` (the rest of `_meta` and the id stay).
host: the key that says the host answered is not the agent's to set
All checks were successful
image / image (pull_request) Successful in 21s
test / changelog (pull_request) Successful in 6s
test / go (pull_request) Successful in 1m16s
09244e06ff
A request for a tool the host does not answer that came with
_meta.roomcity in its tool call was recorded with it, so that the room asked
nothing and the request waited with nobody to answer. The host takes the key
out of such a request.

Assisted-By: Claude <noreply@anthropic.com>
Author
Owner

Read at 09244e0. One thing: withoutAnswerer first looks for the bytes "roomcity" in the message and returns it untouched when they are not there. JSON lets a key be written with escapes, "roomcity" is the same key to the decoder of the room's renderer and is not those bytes, so a request written that way still goes through with the key. Permission requests are few: drop the shortcut and decide on the decoded message, with that spelling in the test.

Read at 09244e0. One thing: `withoutAnswerer` first looks for the bytes `"roomcity"` in the message and returns it untouched when they are not there. JSON lets a key be written with escapes, `"roomcity"` is the same key to the decoder of the room's renderer and is not those bytes, so a request written that way still goes through with the key. Permission requests are few: drop the shortcut and decide on the decoded message, with that spelling in the test.
Author
Owner

The spelling got lost in my comment above. The key written with an escape is "roomcity": those bytes do not contain "roomcity", and a JSON decoder reads them as the key roomcity.

The spelling got lost in my comment above. The key written with an escape is `"roomcity"`: those bytes do not contain `"roomcity"`, and a JSON decoder reads them as the key `roomcity`.
Author
Owner

Third try at the spelling, which my own tooling keeps unescaping: the key is written as a backslash, the letter u, the digits 0072, then oomcity, inside the quotes. Those bytes do not contain the word, and a JSON decoder reads them as the key roomcity.

Third try at the spelling, which my own tooling keeps unescaping: the key is written as a backslash, the letter u, the digits 0072, then `oomcity`, inside the quotes. Those bytes do not contain the word, and a JSON decoder reads them as the key `roomcity`.
mikluko force-pushed host-strip-answeredby from 09244e06ff
All checks were successful
image / image (pull_request) Successful in 21s
test / changelog (pull_request) Successful in 6s
test / go (pull_request) Successful in 1m16s
to 5e2102817b
All checks were successful
test / changelog (pull_request) Successful in 6s
image / image (pull_request) Successful in 20s
test / go (pull_request) Successful in 1m47s
2026-11-16 10:34:44 +00:00
Compare
mikluko deleted branch host-strip-answeredby 2026-11-16 10:36:37 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/roomcity!85
No description provided.