trunk-merge/pr-3580/23f98afc-1a6e-44cc-bccc-26dfb08dff61#3592
Closed
trunk-io[bot] wants to merge 17 commits into
Closed
trunk-merge/pr-3580/23f98afc-1a6e-44cc-bccc-26dfb08dff61#3592trunk-io[bot] wants to merge 17 commits into
trunk-io[bot] wants to merge 17 commits into
Conversation
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
The injected `<channel_context>` block framed a channel's CONTEXT.md purely as read-only reference material, so nothing told a task-doing agent to fix facts it made stale — a renamed file, a flipped flag, a removed resource — and the doc silently drifted for every later task. Add a narrow upkeep carve-out to `buildChannelContextText`: if the agent's work makes a fact wrong, correct just those lines via the PostHog MCP `desktop-file-system-instructions-partial-update` tool, resolving the channel's id and current instructions version at write time (neither is threaded into the prompt) and patching in place. Scoped to material drift, opt-out when unsure. Generated-By: PostHog Code Task-Id: 4d7cc759-7d0a-4ef4-bb57-c06d45e01e3a
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
Greptile flagged that the upkeep write instruction identified its target channel by display name (and emitted no identity at all when the name was absent), so the agent could resolve to the wrong same-named channel or skip the update. Thread the channel's desktop file-system id through task creation as a new `channelContextId` (distinct from the backend feed `channelId`) and embed it verbatim in the injected context, so the agent addresses the CONTEXT.md by that exact id via `desktop-file-system-instructions-partial-update` — never by name. The upkeep instruction is now emitted only when that id is known; otherwise the context stays pure reference material with no write instruction. Also tells the agent to skip the write when the MCP tool isn't reachable (e.g. runtimes without it), addressing the tool-availability concern. Wired from both channel task entry points (WebsiteNewTask, ChannelHomeComposer), which already hold the folder id used to fetch the CONTEXT.md. Generated-By: PostHog Code Task-Id: 4d7cc759-7d0a-4ef4-bb57-c06d45e01e3a
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
Generated-By: PostHog Code Task-Id: 0de359df-d297-4750-b6a2-1aa301a85429
6 updated, 28 removed Run: fdc32692-6abc-4e10-a7cb-4e1060215a23 Co-authored-by: MattPua <3376526+MattPua@users.noreply.github.com>
|
React Doctor found 4 issues in 1 file · 4 warnings. 4 warnings
Reviewed by React Doctor for commit |
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
trunk-io
Bot
deleted the
trunk-merge/pr-3580/23f98afc-1a6e-44cc-bccc-26dfb08dff61
branch
July 20, 2026 15:50
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.
This pull request was created and is being managed by Trunk Merge.
This pull request is based on the main branch at SHA 17394fe0be071a35bddb15c4805ed6d155c8f0e0.
See more details here.
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing the changes from pull request 3580.
Dependencies
This pull request depends on the changes from pull request 3556.