feat: watermark state-tracking with deterministic prioritized task queuing#166
Open
DerekRoberts wants to merge 8 commits intomainfrom
Open
feat: watermark state-tracking with deterministic prioritized task queuing#166DerekRoberts wants to merge 8 commits intomainfrom
DerekRoberts wants to merge 8 commits intomainfrom
Conversation
860bc81 to
86924fc
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a “watermark” (last successful sync timestamp) using GitHub Actions Cache to support gapless synchronization, and threads an explicit since timestamp through the item discovery/search flow.
Changes:
- Add watermark utility (
getWatermark/saveWatermark) backed by@actions/cacheand integrate it into the main sync flow. - Update GitHub search query construction to prefer an explicit
sincetimestamp (falling back to a sliding window). - Expand unit tests for watermark behavior, query construction, and processor utilities; plus various ESM/export/package/docs adjustments.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/utils/watermark.js |
New cache-backed watermark read/write utility. |
src/index.js |
Loads watermark at start and saves watermark on successful completion; passes since through to item discovery. |
src/github/api.js |
Adds since-driven updated:>=... search clauses (fallback to hour-based window). |
src/rules/add-items.js |
Plumbs a since parameter into getRecentItems options. |
test/utils/watermark.test.mjs |
Unit tests for watermark cache integration and sanitization behavior. |
test/github/since-parameter.test.mjs |
Verifies getRecentItems query construction when since is provided vs fallback window. |
test/github/get-recent-items-rate-limit.test.mjs |
Updates assertions for updated:>= query syntax. |
src/utils/log.js |
Adds warn() alias forwarding to warning(). |
src/utils/batch.js |
Converts to ESM exports and adjusts warning logging call-site. |
test/utils/batch.test.mjs |
Adds coverage for processBatch behavior and the new warn() alias. |
src/rules/processors/validation.js |
Refines type-check logic and adds an early return when only type is specified. |
test/processors/ludicrous-coverage.test.js |
Adds extensive matrix coverage for validation/skip whitelist logic and null handling. |
src/rules/processors/unified-rule-processor.js |
Exports deduplicateActions for testing/consumption. |
test/processors/deduplication.test.js |
Adds unit tests for action deduplication behavior. |
src/rules/linked-issues.js |
Converts to ESM imports/exports. |
src/utils/status-tracker.js |
Converts StatusTracker to an ESM export. |
package.json |
Adds @actions/cache/@actions/core, adds build script + @vercel/ncc, changes Node engine. |
package-lock.json |
Locks new dependencies/devDependencies and updated engine metadata. |
action.yml |
Introduces/updates action metadata (name/inputs/env/runtime). |
.github/workflows/pr-sync.yml |
Broadens push branch patterns for workflow trigger. |
README.md |
Substantial documentation rewrite and updated messaging/badges. |
memory/constitution.md |
Updates engineering/testing standards wording (ESM + testing philosophy). |
specs/README.md |
Updates specs index/numbering list and retroactive spec section. |
specs/multi-org-support.md |
Adds a spec doc describing multi-org support behavior/config. |
specs/004-rule-engine-architecture/spec.md |
Adds rule engine architecture spec doc. |
specs/005-column-assignment-rules/spec.md |
Adds column assignment rules spec doc. |
specs/006-sprint-assignment-rules/spec.md |
Adds sprint assignment rules spec doc. |
Comments suppressed due to low confidence (1)
package.json:9
engines.nodewas changed to ">=22.0.0", but the repository documentation (README) and workflows appear to target Node 24, andaction.ymldeclares a Node 20 runtime. Withengine-strict=true, this will break installs under Node 20/21 and creates inconsistent support guarantees. Pick a single minimum Node version and apply it consistently acrosspackage.json, workflows, andaction.yml.
"engines": {
"node": ">=24.0.0"
},
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
This PR consolidates the two major engine upgrades for the Marketplace release:
Key Changes
RatePriorityconstants decoupled to resolve circular dependencies.Results