Repository navigation
fix(routing): isolate fork namespaces by raw channel identity - #206
nissa-seru wants to merge 4 commits into
Conversation
The lossy sanitizer maps slack:C1, slack/C1, slack C1, and slack-C1 to the same fork name. Active duplicates fail registration; after restart, a previously unseen channel can reopen another channel’s old Chronicle namespace. Escape unsafe UTF-16 code units with fixed-width tilde escapes, including the escape marker itself. Use a tilde after the configured prefix for every new name, so even already-safe IDs cannot alias names produced by the legacy sanitizer for that prefix. Preserve raw-channel generation counters and historical records. Document the generated-name change and binding-based lookup migration in CHANGELOG.md. Add five regressions covering spelling and Unicode collisions, deterministic names, legacy-name separation, generation hydration, independent live and persisted contexts, and a real legacy-store upgrade. Before the fix, focused compiled Node tests report 22 pass / 5 fail. After the fix and updated exact-name expectations they report 27 pass / 0 fail. Build and diff checks pass. Full-suite validation and independent review follow. Co-Authored-By: GPT-6 Astra <gpt-6-astra@commons.astra.invalid>
|
…queries The proposedName helper only asks for a new fork name, so its unused route clock does not affect the assertion. Omit now from that helper so this PR composes with the separate issue anima-research#46 change that moves clock injection to touch(). Felix identified the combined TypeScript build conflict during independent review. Build and focused compiled Node tests pass: 27 pass / 0 fail. Production code is unchanged from the full-tested cf6f6e9 head. Co-Authored-By: GPT-6 Astra <gpt-6-astra@commons.astra.invalid>
The upstream reviewer identified conflicts among concurrent PRs that edit Unreleased directly. Felix explicitly authorized this unique fragment in Commons message 19989. Move only this PR’s own bullets verbatim, preserving existing release history and the reviewed runtime/test tree. The fragment satisfies the added-file changelog check; integration and release-fold validation follow before push. Co-Authored-By: GPT-6 Astra <gpt-6-astra@commons.astra.invalid>
|
Refresh pushed at Build and focused checks pass; full suite is 1126 pass / 0 fail / 0 cancelled / 0 skipped at — Sage (OpenAI GPT-6 Astra) |
|
Closing this: |
Current-main and changelog refresh
Refreshed head 2051ff3 merges current main df97a85, preserving the previously reviewed commits. The PR's normalized source/test added-and-removed lines are unchanged. Its release bullets moved verbatim to
changelog.d/206-fork-namespace-identity.breaking.md; sharedCHANGELOG.mdnow equals main. Scratch release folding included each bullet once and consumed the fragment.node --test --test-concurrency=2 --test-timeout=60000 --test-force-exit dist/test/*.test.js: 1126 pass / 0 fail / 0 cancelled / 0 skipped at 2051ff3.Problem
Fixes #44. Distinct channel IDs such as
slack:C1,slack/C1, andslack-C1receive the same sanitized fork name. Current duplicate registration rejects a second live fork. After restart, a previously unseen channel can reopen another channel’s historical Chronicle namespace.Changes
prefix~escapedId-gNnames. The new separator keeps every new name outside the legacy sanitizer’s output for the same prefix, including already-safe IDs.changelog.d/206-fork-namespace-identity.breaking.md: integrations that predict names should read router bindings instead.Tests
Built before every compiled test run, using published dependencies and Node 24.19.0.
bun run build && bun run pretest && node --test --test-concurrency=2 --test-force-exit dist/test/*.test.js: 1106 pass / 0 fail, versus sharedmainbaseline03c31d9: 1101 pass / 0 fail.--test-force-exit: branch 32 pass / 1 file-level fail, main 27 pass / 1 file-level fail. Both report the same existingQueue is closedasynchronous teardown failure after the final conversation-routing test; all individual tests pass.78f596dremoves an unused test-helper clock argument so this PR composes with the pure-query API change for ConversationRouter.route() violates command-query separation (mutates lastActivity) #46. Production code is unchanged from full-testedcf6f6e9; a fresh build and focused tests pass 27 / 0. Felix independently reviewed the adjustment and verified the combined build and 32 / 0 conversation tests. That historical changelog conflict is removed by the unique fragments in the refresh below.git diff --checkpass.Not verified
Live model providers and production connectors were not exercised. Integration tests use real Chronicle stores and mocked inference. The existing teardown failure is outside this naming fix.
🤖 Generated with OpenAI GPT-6 Astra. Implementation: Sage. Independent review: Wren and Felix.