chore(assistant): delete obsolete update-bulletin materialization#26402
Merged
Conversation
Comment on lines
-15
to
-27
| import { | ||
| appendReleaseBlock, | ||
| filterNewContentBlocks, | ||
| hasReleaseBlock, | ||
| } from "./update-bulletin-format.js"; | ||
| import { | ||
| addActiveRelease, | ||
| getActiveReleases, | ||
| isReleaseCompleted, | ||
| markReleasesCompleted, | ||
| setActiveReleases, | ||
| } from "./update-bulletin-state.js"; | ||
| import { getTemplatePath } from "./update-bulletin-template-path.js"; |
Contributor
There was a problem hiding this comment.
🟡 Dead Code Removal rule violation: orphaned helper modules left behind after deleting their sole production consumer
Deleting assistant/src/prompts/update-bulletin.ts was the only production consumer of three helper modules, which are now dead code in violation of the AGENTS.md "Dead Code Removal" rule ("Remove code your change makes unused, clean up adjacent dead code, delete rather than comment out, check for orphaned files").
Orphaned files that should also be deleted
assistant/src/prompts/update-bulletin-template-path.ts— completely orphaned, zero imports anywhere in the codebaseassistant/src/prompts/update-bulletin-state.ts— only imported by its test file (assistant/src/__tests__/update-bulletin-state.test.ts), no production consumer remainsassistant/src/prompts/update-bulletin-format.ts— only imported by its test file (assistant/src/__tests__/update-bulletin-format.test.ts), no production consumer remainsassistant/src/__tests__/update-bulletin-state.test.tsandassistant/src/__tests__/update-bulletin-format.test.ts— tests for dead production codeassistant/src/prompts/templates/UPDATES.md— only referenced by the orphanedupdate-bulletin-template-path.ts; not used byensurePromptFiles()(which only copiesPROMPT_FILES = ["SOUL.md", "IDENTITY.md"]atassistant/src/prompts/system-prompt.ts:29)
The replacement module (assistant/src/prompts/update-bulletin-job.ts) uses its own hash-based dedup mechanism and does not import any of these helpers.
Prompt for agents
The PR deletes update-bulletin.ts but leaves behind several helper modules that are now dead code. The following files should also be deleted in this PR to comply with the AGENTS.md Dead Code Removal rule:
1. assistant/src/prompts/update-bulletin-template-path.ts (zero imports anywhere)
2. assistant/src/prompts/update-bulletin-state.ts (only imported by its test file, no production consumer)
3. assistant/src/prompts/update-bulletin-format.ts (only imported by its test file, no production consumer)
4. assistant/src/__tests__/update-bulletin-state.test.ts (tests dead code)
5. assistant/src/__tests__/update-bulletin-format.test.ts (tests dead code)
6. assistant/src/prompts/templates/UPDATES.md (only referenced by update-bulletin-template-path.ts which is itself orphaned; not used by ensurePromptFiles in system-prompt.ts)
The new update-bulletin-job.ts uses its own hash-based approach and does not depend on any of these modules.
Was this helpful? React with 👍 or 👎 to provide feedback.
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
assistant/src/prompts/update-bulletin.tsand its test. PR 5 already swapped the last caller (lifecycle.ts) to the newrunUpdateBulletinJobIfNeededfire-and-forget path.update-bulletin-state.ts,update-bulletin-format.ts, andupdate-bulletin-template-path.tsin place — those are removed in PRs 7-9.Part of plan: updates-md-background-job.md (PR 6 of 9)