Skip to content

fix(coding-agents): stagger daily page refresh schedules - #4176

Closed
altaywtf wants to merge 3 commits into
vectorize-io:mainfrom
altaywtf:fix/coding-agent-daily-stagger
Closed

fix(coding-agents): stagger daily page refresh schedules#4176
altaywtf wants to merge 3 commits into
vectorize-io:mainfrom
altaywtf:fix/coding-agent-daily-stagger

Conversation

@altaywtf

@altaywtf altaywtf commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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.

Copilot AI lite review requested due to automatic review settings September 7, 2026 07:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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 existing refresh_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.

@nicoloboschi

Copy link
Copy Markdown
Collaborator

superseded by #4208

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.

3 participants