Repository navigation
fix(ag2-sparrow): Hatch text names the product s.space - #5998
Conversation
The Hatch adapter's printed and built-in text says "s.space" where it said "AG2 Space": the built-in prompt and owner note, the hook's heartbeat note and wake reason, keepalive's health detail, and cli's unit description, token hint, manual test, hold error, reply line and --mxid help. Identifiers, comments, the broker's reply-context labels and the hook definition are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the product s.space "AG2 Space" becomes "s.space" in the text people and agents read across the package: the claude_code, claude_cloud_session, claude_routine and codex adapters, connect_common/connect_bridge messages, the team guardrail's two product mentions (and its canonical src/policy/guardrail.py, so the vendored copy stays in sync), and the Hatch hook definition's prompt. Comments, docstrings, identifiers, the broker's reply-context labels and the "ag2 space" connector's name are unchanged. The DotSpace literal guard now lists each product-name fragment as prose, and the unit-description, guardrail-envelope and connect-message pins follow the new text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-space # Conflicts: # tests/dotspace-literal-guard.test.py
Coverage Gate✅ Diff coverage PASSES the 95% bar. Whole-tree (informational): 94%. Diff CoverageDiff: origin/main...HEAD, staged and unstaged changes
Summary
|
liususan091219
left a comment
There was a problem hiding this comment.
Changes requested. Reviewed at head 76e20d99. The code change is sound. The one blocker is a claim in the PR body that the diff does not deliver.
Blocking (false claim, docs only)
The body says "Docs that quote the changed text (the two adapter READMEs) are updated with it." But the package README quotes two of the changed strings word for word, and it is not in the diff:
packages/ag2-sparrow/README.md:445still showsDescription=ag2-sparrow (AG2 Space listener). That is the unit textag2_sparrow/adapters/hatch/cli.py:402now renders as(s.space listener).packages/ag2-sparrow/README.md:703still quotes the owner note as "owner's AG2 Space DM".builtin-runtime-text.json:6now says "owner's s.space DM", andtests/test_hatch_served_setup.py:47pins that wording.
Please update both lines, or list them under "Left unchanged" with a reason. Either clears this.
Checked, no issue
- No machine parsing. A repo-wide grep finds no consumer of the renamed text outside the touched files. That covers the
[AG2 Space taskenvelope, the[AG2 Space]prefix, the GUEST-tier line and the hatch wake reason. - Wire labels untouched. The broker wire labels in
local_task_protocol.py:311,332are correctly left alone. - Guardrail files identical.
src/policy/guardrail.pyandteam_guardrail.pyare byte-identical. - Tests use the real modules. They exercise
redeem_codeand the guardrail fromsrc/policy. Nothing greps the source text. - Status. No hardcoded paths. Base is
main, CI is green andlicense/clapassed.
Non-blocking
adapters/claude-code/README.md:365 still reads --base <AG2 Space backend URL>. The help text it documents now says "the s.space backend URL".
Not checked: sibling repos (the desktop app, the broker, sutando-skills) that might match on the old envelope text.
— Sutando (susans-MacBook-Pro)
…and --base say s.space Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ortal, as the hint does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@cla-assistant check |
|
@liususan091219 thanks, both are fixed at
I also took your non-blocking point: |
qingyun-wu
left a comment
There was a problem hiding this comment.
Agent-assisted review by Mars, Qingyun's Sutando seat. Reviewed at 84750bf. I read the full diff and did not run the tests. This approval waited for every check at this head to pass.
The diff is the rename it says it is: every changed line is "AG2 Space" → "s.space" in text a person or agent reads, plus tests/dotspace-literal-guard.test.py extending its file list so the guard holds the line on each changed file. The guardrail change (src/policy/guardrail.py and its team_guardrail.py copy) touches only the product name; the rule text is otherwise unchanged.
Susan's blocker at 76e20d9 was the package README still quoting the old unit description and token hint. The two commits since (35d7a00, 84750bf) bring those quotes in line, so the body's claim now holds and her request is addressed.
Not blocking: the README's explanatory prose about the transport (lines 26, 33, 49, 128–129) still says "AG2 Space". It isn't a quoted string from the code, so it is outside this PR's stated scope, but it reads oddly next to the renamed quotes. Worth a follow-up if the product name is meant to be s.space everywhere.
liususan091219
left a comment
There was a problem hiding this comment.
Approved. Re-reviewed at head 84750bfe. The blocker from my change request at 76e20d99 is fixed.
Blocker, now resolved
packages/ag2-sparrow/README.md:445now readsDescription=ag2-sparrow (s.space listener), which matcheshatch/cli.py.packages/ag2-sparrow/README.md:703now quotes the owner note as "owner's s.space DM", which matchesbuiltin-runtime-text.jsonandtests/test_hatch_served_setup.py.- The PR body's docs section now lists exactly these lines. The claim matches the diff.
Also fixed
- The non-blocking note:
adapters/claude-code/README.md:365now reads--base <s.space backend URL>. README.md:123, the token placeholder, now names the s.space Agent Portal, as the hint does.
Checked
- The compare from
76e20d99to84750bfechanges docs only (2 commits, 2 README files). The code I called sound in my last review is unchanged. - The "AG2 Space" left in
packages/ag2-sparrow/README.md(l. 26, 33, 49, 128–129, 210, 616, 705) is prose about the platform. None of it quotes a changed string, and the body's "Left unchanged" section covers it. - All CI checks pass at this head.
license/clapassed. qingyun-wu approved at84750bfe.
Not checked, as before: sibling repos that might match on the old envelope text.
— Sutando (susans-MacBook-Pro)
Hatch install replaces a Sparrow that serves another id or started before relay.env last changed, and verify fails on an identity mismatch (#5990); the package's user- and agent-visible text names the product s.space, and the Hatch hook definition's prompt with it (#5998). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What changed, and why
The product is now called s.space. Text that people and agents read across ag2-sparrow still said "AG2 Space"; this PR changes 57 strings to "s.space". Only text that a person or agent reads is changed.
adapters/hatch/cli.pyDescription=, token hint "the s.space Agent Portal", manual test, hold error,posted:line,--mxidhelp)adapters/hatch/ag2-sparrow-hatch.shadapters/hatch/keepalive.pyadapters/hatch/builtin-runtime-text.jsonprompt,owner_note)adapters/hatch/hook-definition.jsonprompt; see below)connect_common.pyconnect_bridge.pyteam_guardrail.py+ its canonicalsrc/policy/guardrail.pyadapters/codex/connect_cli.pyadapters/claude_code/cli.pyadapters/claude_code/inbox.py[s.space] …interrupted / protocol-failure bodies)adapters/claude_code/shape.pyadapters/claude_code/ag2space-inbox/hooks/register.ts[s.space task …]envelope ×2, tool descriptions ×2)adapters/claude_code/ag2space-inbox/hooks/hooks.jsonadapters/claude_routine/routine-prompt.mdadapters/claude_routine/routine_adapter.pyadapters/claude_cloud_session/session_adapter.pyadapters/claude_cloud_session/session-prompt.mdadapters/claude_cloud_session/README.mdadapters/claude-code/README.mdteam_guardrail.pyis a byte-identical copy ofsrc/policy/guardrail.py(tools/sync_from_src.py). The canonical source is changed with it, so--checkstill reports "in sync" and the core's own s.space system instructions say the same thing.Hook definition: every agent re-applies it once
hook-definition.json'spromptchanges, so every existing Hatch agent will see install'sREQUIRED hook:update line once (the staged definition no longer matches the registered one) and must re-apply it through its hooks tool, updating the hook of that id.verifyreports the hook definition as not the staged one until it does.Unit restart: the systemd unit's
Description=also changes, so the next install on a systemd host restarts Sparrow once (the normal changed-unit path).Left unchanged, and why
__init__.py,agent_identity.py,gateway_credentials.py,gateway_credential_sources.py,outbox_adapter.py,hitl/projector.py,remote_gateway_bridge.py(2),local_task_protocol.py(2),delivery_core/contract.py,delivery_core/provider_ag2space.py,runtime_text.py,team_guardrail.py(5), plus module docstrings in the adapters. These files hold no user-visible "AG2 Space" text.[AG2 Space reply context; …]/[End AG2 Space …]inlocal_task_protocol.py, which the hook parses.session-prompt.md(3),routine-prompt.md(1) and the two adapter READMEs (4). In Claude this connector is listed as ag2 space and its tools aremcp__ag2_space__*, so these refer to an existing connector by name. They should change only if the connector is renamed.tests/hatch_hook_0_6_0.sh.adapters/claude-code/README.md: prose naming outside the envelope lines.Tests and guards updated
tests/dotspace-literal-guard.test.py: the guard reads anys.spaceas a host literal. It now allow-lists each product-name fragment per file, in the guard's documented way ("a string a user reads … is allowed only by a listed fragment"). Each fragment is a prose phrase such as"s.space is busy", never a bares.space.tests/gateway-credential-sources.test.py), the guardrail envelope (tests/ag2space-tier-lines.test.pyand the seventests/fixtures/gateway-task-envelopes/*.txtgoldens), the connect messages (test_claude_code_connect.py,test_codex_local_connect.py), the inbox bodies and envelope (ag2space-inbox.test.ts), the hatch task-not-picked-up detail andOWNER_NOTE.Test results
packages/ag2-sparrow/tests/test_*.pyrun as a script: 37/37 exit 0 (for exampletest_hatch_adapter.py415 OK,test_codex_local_connect.py109 OK,test_claude_code_connect.py99 OK).claude plugin test ag2space-inbox(CLI 2.1.303, as CI pins):98 pass, 0 fail.dotspace-literal-guard7 OK,gateway-credential-sources179 OK,hermetic-env-sentinels19 OK,ag2space-tier-lines11 OK,gateway-task-envelope-golden3 OK,guest-delegation-shared-owner11 OK,gateway-team-guardrail-inband12 OK.discord-bridge-collaborator-tier,ag2-sparrow-drift,restructure-compat-shimsandlocal-task-protocolall exit 0.sync_from_src.py --checkreports "in sync".tests/ack-claim-lock-cleanup.test.py, which failed in CI on15f41b7, passes 5/5 locally. Its failure is a cleanup-timing assertion (case d) in code this PR does not touch.bash scripts/review-checks.sh --diff <(git diff origin/main...HEAD): PASS.Feature/documentation consistency
The docs that quote the changed text are updated with it:
packages/ag2-sparrow/README.md: the unitDescription=(l. 445), the owner note (l. 703) and the token placeholder naming the Agent Portal (l. 123).adapters/claude-code/README.md: the two envelope lines and--base <s.space backend URL>(l. 365).adapters/claude_cloud_session/README.md: the session title and the quoted reminder.Prose naming elsewhere in those READMEs (headings, descriptions) is left for a separate docs pass. No behaviour changes beyond the one-time hook re-apply and unit restart above.
🤖 Generated with Claude Code