Skip to content

revert: defer subagent attribution until linkage refactor - #22058

Merged
brennanb2025 merged 1 commit into
mainfrom
revert-21398-brennanb2025/attr-parent-label
Sep 21, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
revert-21398-brennanb2025/attr-parent-label

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​469 $\color{#cf222e}{\Huge{\mathbf{−}}}$​463
Prod 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​74 $\color{#cf222e}{\Huge{\mathbf{−}}}$​216 $\color{#cf222e}{\Huge{\mathbf{−}}}$​142

Revert #21398 so the subagent attribution fix can be rebuilt around explicit parent/child linkage instead of landing an interim persisted boolean that would immediately require migration. The larger refactor will restore the user-visible fix as part of the durable model.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: d0ee3d06-74be-44c9-9f89-ca6e3f7dc134

📥 Commits

Reviewing files that changed from the base of the PR and between 7da9788 and 2968fbe.

📒 Files selected for processing (23)
  • src/main/claude/claude-message-journaling.ts
  • src/main/claude/claude-streamed-block-identity.ts
  • src/main/claude/claude-streamed-text-checkpoints.ts
  • src/main/claude/claude-structured-journal-translation-subagents.test.ts
  • src/main/claude/claude-structured-journal-translation.ts
  • src/main/claude/claude-structured-provider-fallback.ts
  • src/main/native-chat/agent-session-journal/journal-item-appender.ts
  • src/main/native-chat/agent-session-journal/journal-reducer.test.ts
  • src/main/native-chat/agent-session-journal/journal-reducer.ts
  • src/main/native-chat/agent-session-journal/journal-row-builders.ts
  • src/main/native-chat/agent-session-journal/journal-row-schema.test.ts
  • src/main/native-chat/agent-session-journal/journal-row-schema.ts
  • src/main/native-chat/agent-session-journal/journal-store-contracts.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-event-sink.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-event-sink.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-resolved-append.ts
  • src/shared/agent-session-journal-producer.ts
  • src/shared/agent-session-journal-schemas.ts
  • src/shared/agent-session-journal-types.ts
  • src/shared/structured-agent-session-live-turn.test.ts
  • src/shared/structured-agent-session-live-turn.ts
  • src/shared/structured-agent-session-projection.test.ts
  • src/shared/structured-agent-session-projection.ts
💤 Files with no reviewable changes (6)
  • src/main/native-chat/agent-session-wire/structured-agent-session-event-sink.test.ts
  • src/shared/agent-session-journal-producer.ts
  • src/main/native-chat/agent-session-journal/journal-row-schema.ts
  • src/main/native-chat/agent-session-journal/journal-reducer.test.ts
  • src/shared/structured-agent-session-projection.test.ts
  • src/shared/agent-session-journal-types.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change removes producedBySubagent from Claude journaling, streamed text, provider fallback, journal storage, event wiring, schemas, and render types. Producer-tracking tests and root-agent classification helpers are removed. Live-turn readers and session projections now consider journal items from any agent. Existing child-activity observation and recovery metadata remain unchanged.

Priority: ➖ Normal

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description clearly explains the revert and its purpose, but it omits most required template sections, including ELI5, What Changed, Why, the required Linked Issue format, Visual Proof, Testing, A… Complete the required template sections. Add the ELI5 summary, detailed before-and-after change description, rationale, a valid linked issue using the required format, Visual Proof with N/A and a reason if applicable, testing steps and plat…
Docstring Coverage ⚠️ Warning Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 17 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: deferring subagent attribution until the linkage refactor.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the revert and its purpose, but it omits most required template sections, including ELI5, What Changed, Why, the required Linked Issue format, Visual Proof, Testing, AI Disclosure, Review, boundary confirmation, Notes, and Checklist items.

Resolution

Complete the required template sections. Add the ELI5 summary, detailed before-and-after change description, rationale, a valid linked issue using the required format, Visual Proof with N/A and a reason if applicable, testing steps and platform coverage, AI disclosure when applicable, review and boundary sections, notes on compatibility and performance, and the checklist confirmations.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This is a single-commit, mechanical revert of #21398 (33ba1ff3df), verified against the repo rather than taken on trust:

  • Removed the producedBySubagent marker end to end — the persisted row field and render-item type/schema, the append-options plumbing through the event sink, journal appender, row builders, reducer, and provider fallback, plus the isRootAgentJournalItem helper file (src/shared/agent-session-journal-producer.ts) it introduced.
  • Restored the pre-fix readers — isStructuredAgentSessionThinking and activeStructuredAgentSessionToolCall, the status-summary and assistant/prompt projection scans, and the Claude streamed-block/checkpoint producer plumbing now read every row in the journal again.
  • Dropped the tests that pinned the marker behavior — the added producer-attribution suites in the Claude translation, reducer, schema, event-sink, live-turn, and projection tests.

Revert fidelity. The changed file set and line counts are the exact inverse of the original commit (23 files, +80/−685), git diff 2968fbe609 33ba1ff3df^ over the touched paths is empty, and no commit between 33ba1ff3df and the base (7da9788c83) touched any of those paths, so the revert undoes nothing unrelated. A repo-wide search for producedBySubagent, isRootAgentJournalItem, and agent-session-journal-producer returns no residual references, and the deleted file has no dangling importers.

Rows written during the fix's window remain readable. Because #21398 deliberately did not bump AGENT_SESSION_JOURNAL_SCHEMA_VERSION, a journal can already contain rows carrying the removed key. After this revert they still parse: isJournalRow (journal-row-schema.ts:178) validates required fields and ignores unknown keys, and the wire-facing AgentJournalRenderItemSchema (agent-session-journal-schemas.ts:240) is a non-strict zod object that strips unknowns. So the revert does not latch any host read-only and needs no migration — the premise behind "rebuild around linkage instead of migrating an interim boolean" holds.

Intentional consequence, noted for the record. The user-visible fix is given up: a subagent's newer prose / running tool call will once more be reported as the parent's own in the status line and sidebar summary until the linkage refactor lands. The PR body says this explicitly, so it reads as a deliberate scope decision rather than a defect.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant