Repository navigation
fix(cli): admit CLI tag removal through the daemon - #5645
Merged
Merged
Conversation
mutate-remove-tag declared no allowed_surfaces, so the executor back-fill made it API-only and every 'mark --tag-remove' lowered by the daemon under a cli principal was refused with SurfaceDeniedError. Its add counterpart (mutate-bulk-tag-sessions) admits api and cli; the removal now does too, and the daemon write test drives the removal payload. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
A parent re-parse that drops the child's branch-point message records lineage_prefix_recompose debt; nothing drove that debt through the drain to show the child's composed transcript comes back complete. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mark --tag-removethrough the daemon was refused on every route.mutate-remove-tagnow admits theapiandclisurfaces, matching its add counterpart.lineage_prefix_recomposedebt stage.Problem
mutate-remove-tagdeclared noallowed_surfaces._declare_executor_authoritytherefore back-filled it as API-only, andMutationTransaction.prepare_boundraisedSurfaceDeniedErrorfor thecliprincipal. The CLI removal payload ofmutation.session.taglowers onto exactly that per-target actuator, so every CLI tag removal failed. The add payload lowers ontomutate-bulk-tag-sessions, which admitsapiandcli. That asymmetry survived because the daemon write test drove only the add payload.The lineage half of this PR adds no production code. A parent full replace that drops a child's branch-point message has, since #5376, recorded
lineage_prefix_recomposedebt, and the stage re-derives the child from its retained raw. No test drove that debt through the drain for this loss, only for the identity-alias loss.Solution
polylogue/operations/specs.py:mutate-remove-tagdeclaresallowed_surfaces=("api", "cli").tests/unit/daemon/test_http_write_coordination.py: a real-daemon test adds a tag and then removes it throughmutation.session.tag. It asserts twomutate-remove-tagoperation runs under theclisurface. Anti-vacuity: deleting the declaration makes the removal fail withSurfaceDeniedError.tests/unit/daemon/test_convergence_debt.py: seeds a two-link Codex lineage and replaces the parent through the writer with its branch-point message under a new native id. It asserts that the child is stranded with one debt row, drains once, and asserts that the child's composed transcript is complete again and the row is cleared.Verification
devtools test tests/unit/daemon/test_http_write_coordination.py tests/unit/daemon/test_convergence_debt.py tests/unit/operations/test_specs.py tests/unit/api/test_facade_mutation_census.py tests/unit/mcp/test_privileged_tools.py→ 82 passed, 35 failed.test_privileged_tools.pyandtest_facade_mutation_census.py. The same two files on cleanorigin/mastergive 41 passed, 35 failed, so none come from this PR. They are the facade'sFacadeDaemonRequiredErrorroute and the pinned facade inventory.devtools verify --quick→verify: PASSED exit=0Residuals
polylogue/operations/specs.pyis inside the derived schema-identity closure, so this must land before a fresh rebuild starts.🤖 Generated with Claude Code
https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4