Repository navigation
feat: usage rows of a linked workspace - #1511
ralphstodomingo wants to merge 19 commits into
Conversation
Each prompt turn resolves the project's local binding (no network) into the telemetry context, and the envelope builder stamps workspace_id on every row of the session; a row's own id wins. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
Workspace skills, memory and integration calls carry a workspace value and are counted per session for session_end and task_outcome_signal; new starter_shown, workspace_memory_contributed and workspace_sync_failed; skill_published carries the workspace id. Closes #1510 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
Codex review logStacked on #1509; review only the two commits above it. Review runs against these claims. Report only a reproducible trace that violates a numbered claim; instances of the disclosed residuals are not findings. A round with no claim violation ends review. Claims
Residuals
Rounds: round 1 on 88d648a found C5 and C10 (fixed in 1ef15a4); round 2 on 1ef15a4 found C2 (flush-time context read) and C9 (memory failure flattened), fixed in bb25f62; round 3 on bb25f62 found C2 again (a serve process moving the context before the row is tracked), fixed in 7a79820. The cap of three Codex rounds is spent. Cubic's first pass (on the ready flip) found 15 items: 13 fixed and one bounded in 0eec72e (C2, C3, C4, C5, C6, C7, C8, C9 updated above), one declined (R5). 0eec72e is not Codex-reviewed. Kilo's four items (global blocks reported on the live mirror, memory counted per step, the injection row's session, an unneeded string conversion) fixed in 7ad35e1, also unreviewed by Codex. Cap raised (Ralph, 2026-10-15: more rounds are fine as long as we evaluate why they keep being needed): a further round reviews a80cfe4. Round 4 on a80cfe4 found C2/C6 twice over (the |
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the two commits above it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88d648aa23
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
MCP tools never pass through Tool.define, so the via_workspace row and the integrations count now come from the MCP execution path, keyed on the client name; the id-prefix test in tool.ts is gone, so datamate_manager no longer counts. The TUI publish event carries workspace_id like the CLI and serve paths. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the three commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ef15a496c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…tail A serve process can move the context to another session before the batch is serialised, and the memory sync record flattened every failure to one text, so its reason class was always other. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the four commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb25f62e21
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A serve process runs sessions side by side, so the process-wide context can belong to another session's turn when an event is tracked; the workspace is now kept per session and read by the event's session_id. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (30 files)
Previous Review Summaries (15 snapshots, latest commit cf996bf)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit cf996bf)Status: No Issues Found | Recommendation: Merge Files Reviewed (27 files)
Previous review (commit 37563d1)Status: No Issues Found | Recommendation: Merge Files Reviewed (48 files)
Previous review (commit 9bfe318)Status: No Issues Found | Recommendation: Merge Files Reviewed (34 files)
Previous review (commit 3ce788b)Status: No Issues Found | Recommendation: Merge Files Reviewed (30 files)
Previous review (commit be3b516)Status: No Issues Found | Recommendation: Merge Files Reviewed (25 files)
Previous review (commit 6235bc5)Status: No Issues Found | Recommendation: Merge Files Reviewed (21 files)
Previous review (commit bd1190b)Status: No Issues Found | Recommendation: Merge Files Reviewed (21 files)
Previous review (commit bff3931)Status: No Issues Found | Recommendation: Merge Files Reviewed (21 files)
Previous review (commit 71ac2a9)Status: No Issues Found | Recommendation: Merge Files Reviewed (18 files)
Previous review (commit 9336e58)Status: No Issues Found | Recommendation: Merge Files Reviewed (18 files)
Previous review (commit 20e3f31)Status: No Issues Found | Recommendation: Merge Files Reviewed (18 files)
Previous review (commit bd423b4)Status: No Issues Found | Recommendation: Merge Files Reviewed (18 files)
Previous review (commit a80cfe4)Status: No Issues Found | Recommendation: Merge Files Reviewed (18 files)
Previous review (commit 7ad35e1)Status: No Issues Found | Recommendation: Merge Files Reviewed (18 files)
Previous review (commit 0eec72e)Status: 5 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (18 files)
[Snapshot truncated.] Additional previous summary content was truncated to keep this comment within platform limits. Reviewed by gemini-4-argon · Input: 295.8K · Output: 2.7K · Cached: 2.2M Review guidance: REVIEW.md from base branch |
Session entries end with the turn, not at shutdown; the engine key counts only in a bound turn; only project cloud blocks are workspace memory; skill source scoped to this project; unknown starter contents omitted; documents counter removed; failure text keeps the status and is redacted. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
…ite-backs Memory is injected on every step, so the count keeps the largest injection instead of summing; a global block's live mirror reports nothing; the injection row names the injecting session. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
There was a problem hiding this comment.
1 issue found across 13 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/opencode/test/altimate/workspace/tool-call-telemetry.test.ts">
<violation number="1" location="packages/opencode/test/altimate/workspace/tool-call-telemetry.test.ts:14">
P3: This leaves the singleton telemetry context set to `s1`/workspace `42` after the suite; `endSession` does not reset it, so later session-less `Telemetry.track` events can inherit this test's workspace. Save and restore the previous context in `afterEach`.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a80cfe4343
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… current turn The session_end row was stamped after its own workspace entry was deleted, and a cancelled turn unwinding late could end the replacement's entries. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bff3931236
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6235bc5b8b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`track()` no longer stamps `workspace_id` from a process-wide or per-session fallback (five rounds of cancelled-turn attribution bugs came from it). `setContext` returns a turn token; loop, tool, skill, memory and first-job rows carry their turn's workspace explicitly; counters key on the turn. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
1fb6e1f to
be3b516
Compare
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be3b51691a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
All reported issues were addressed across 9 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…house rows name it `tool.execute.after` gains `workspaceId`, set by the three trigger sites from the turn that ran the tool, so `first_job_completed` names it without asking the session for its current turn. `batch` passes `workspaceId`/`turn` to its inner contexts; `warehouse_add`'s suggestion failure names the turn's workspace. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ce788b42a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bfe318b6b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37563d1f7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
All reported issues were addressed across 17 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
37563d1 to
3ce788b
Compare
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ce788b42a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ouse failure row names the tool's session Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
|
@codex review against the numbered claims and the disclosed residuals in the review-log comment on this PR: report only a reproducible trace that violates a numbered claim. Instances of the disclosed residuals are not findings. A round with no claim violation ends review. This PR is stacked on #1509: review only the commits above it. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@cubic review |
@ralphstodomingo I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 30 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…rry the binding Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE
Closes #1510
Stacked on #1509 (the link lifecycle); review the two commits above it.
What
The rows that say how a linked workspace is used, per the shared event contract.
workspace_id. Each prompt turn resolves the project's local binding (no network) and passes it explicitly:session_startandsession_end,first_prompt_sentandfirst_job_completed,task_classified,task_outcome_signaland the loop's other outcome rows; tool call and failure rows through the tool context (batch's inner tools included);skill_used;memory_injectionandmemory_operationthrough the injection context; the workspace rows carry their own ids. Nothing is stamped ambiently. Every other row (generation, compaction, SQL fingerprints, file-time, suggestions, native warehouse, MCP, permissions) joins throughsession_id.skill_used.skill_sourcegainsworkspace(skills synced into the managed_workspacefolder);memory_injection.scopes_usedgainsworkspaceand aworkspace_blockscount when blocks came from the workspace's cloud memory;tool_callgainsvia_workspaceon calls to the workspace's MCP tools;skill_publishedcarries the workspace id.session_end(workspace_skills_used,workspace_documents_used,workspace_memory_blocks,workspace_integration_calls) andtask_outcome_signal.workspace_context_used.starter_shownwhen the post-link starter is served (what the workspace provides, as counts);workspace_memory_contributedon every block written back to the workspace;workspace_sync_failedwhen a kind's sync status flips to error, with a reason class.Not here:
workspace_document_used(no document read path exists yet to hook), the session-start counts of what the workspace provides (they need the service; the starter row carries them when served), and a usage-limit event (which limits count is undefined).Why
Linking tells the funnel a workspace reached the CLI; these rows tell it whether the workspace is then used, and what it gives back.
Verification
_workspaceskill source, a memory injection with a workspace block (scope and count), the write-back event, the sync-failure event and its reason classifier, the starter event's counts.tsgo --noEmit, oxlint and the marker guard clean. Two unrelated timing flakes in the wider suites (session prompt, tool registry) pass alone on this branch and on the base.🤖 Generated with Claude Code
https://claude.ai/code/session_011AhtJPr3nmT1Po92ZQk4VE