fix(coding-agents): stagger daily page refresh schedules - #4176
Closed
altaywtf wants to merge 3 commits into
Closed
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The changes are localized, covered by targeted tests for the new scheduling mode and the tag-only patch behavior, and align with the server’s trigger-as-patch semantics to avoid clobbering manual schedules.
Pull request overview
Adds an opt-in “daily-staggered” knowledge-page refresh mode for the coding-agents integration so new pages refresh once per day on a stable, per-bank/per-page UTC schedule (instead of all pages sharing the same daily cron), and updates reconciliation logic to avoid overwriting manually edited schedules.
Changes:
- Introduces
pageTriggerType: "daily-staggered"and computes a stable per-bank/page daily cron minute via hashing at page creation time. - Extends page-trigger plumbing to allow a per-page trigger factory (
PageTriggerSource) so seed/initiative creation can pass page identity into trigger construction. - Changes tag-policy reconciliation to patch only
trigger.tags_match(not the full trigger), preserving existingrefresh_cron/ schedules.
File summaries
| File | Description |
|---|---|
| hindsight-integrations/coding-agents/src/mcp-server.ts | Threads per-page trigger factory into tool selection so page identity can be used for staggered schedules. |
| hindsight-integrations/coding-agents/src/deepen.ts | Configures banks with a per-page trigger factory (enables staggered scheduling during seeding). |
| hindsight-integrations/coding-agents/src/core/runtime.ts | Uses per-page trigger factory when building knowledge tools in the runtime core. |
| hindsight-integrations/coding-agents/src/core/missions.ts | Adds daily-staggered trigger mode, PageIdentity, and PageTriggerSource; hashes bank+path into a daily cron time. |
| hindsight-integrations/coding-agents/src/core/missions.test.ts | Adds deterministic tests for staggered scheduling and updates config-type wording. |
| hindsight-integrations/coding-agents/src/core/knowledge-tools.ts | Updates types to accept PageTriggerSource and passes it through to initiative capture. |
| hindsight-integrations/coding-agents/src/core/hindsight.ts | Applies per-page trigger during seeding/initiative creation and patches only tags_match on reconciliation to preserve manual schedules. |
| hindsight-integrations/coding-agents/src/core/hindsight.pages.test.ts | Adds regression coverage for staggered seeding + schedule preservation and for tag-only trigger patching. |
| hindsight-integrations/coding-agents/src/core/config.ts | Extends config resolution/types to support pageTriggerType: "daily-staggered". |
| hindsight-integrations/coding-agents/skill/SKILL.md | Documents the new daily-staggered option and behavior. |
| hindsight-integrations/coding-agents/README.md | Documents the new daily-staggered option and behavior (source for generated artifacts). |
| hindsight-docs/docs-integrations/coding-agents.md | Updates published docs to include daily-staggered configuration and semantics. |
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
superseded by #4208 |
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.
A shared daily cron makes every coding-agent knowledge page refresh at once, allowing refresh work to delay ingestion. Add opt-in
pageTriggerType: "daily-staggered"so new standard and initiative pages receive a stable per-bank/page UTC schedule; existing schedules remain untouched.Tag-policy reconciliation now patches only
tags_match, preserving manually edited schedules instead of replacing the whole trigger.Validation: 848 tests across 64 files passed, package build and TypeScript checks passed, repository lint passed, and generated skill/docs were refreshed. The tag-repair regression fails against the previous full-trigger patch. One independent slopguard review passed with no findings. Hashing distributes schedules approximately; collisions remain possible.