opencode-pilot 0.24.5 → 0.24.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Formula/opencode-pilot.rb +2 -2
- package/package.json +1 -1
- package/service/poller.js +4 -0
- package/test/unit/poller.test.js +23 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class OpencodePilot < Formula
|
|
2
2
|
desc "Automation daemon for OpenCode - polls GitHub/Linear issues and spawns sessions"
|
|
3
3
|
homepage "https://github.com/athal7/opencode-pilot"
|
|
4
|
-
url "https://github.com/athal7/opencode-pilot/archive/refs/tags/v0.24.
|
|
5
|
-
sha256 "
|
|
4
|
+
url "https://github.com/athal7/opencode-pilot/archive/refs/tags/v0.24.5.tar.gz"
|
|
5
|
+
sha256 "6a191feaa9f7ec7421272a0c9533ebbd734a45483ca7116135b62e4ba11e780d"
|
|
6
6
|
license "MIT"
|
|
7
7
|
|
|
8
8
|
depends_on "node"
|
package/package.json
CHANGED
package/service/poller.js
CHANGED
|
@@ -1275,6 +1275,10 @@ export function createPoller(options = {}) {
|
|
|
1275
1275
|
const storedFeedbackAt = meta.latestFeedbackAt;
|
|
1276
1276
|
const currentFeedbackAt = item._latest_feedback_at;
|
|
1277
1277
|
|
|
1278
|
+
// No stored baseline: any current feedback is new (legacy state entries)
|
|
1279
|
+
if (!storedFeedbackAt && currentFeedbackAt) {
|
|
1280
|
+
return true;
|
|
1281
|
+
}
|
|
1278
1282
|
if (storedFeedbackAt && currentFeedbackAt && currentFeedbackAt > storedFeedbackAt) {
|
|
1279
1283
|
return true;
|
|
1280
1284
|
}
|
package/test/unit/poller.test.js
CHANGED
|
@@ -855,7 +855,7 @@ describe('poller.js', () => {
|
|
|
855
855
|
);
|
|
856
856
|
});
|
|
857
857
|
|
|
858
|
-
test('shouldReprocess returns false when attention stays true with no timestamps', async () => {
|
|
858
|
+
test('shouldReprocess returns false when attention stays true with no timestamps on either side', async () => {
|
|
859
859
|
const { createPoller } = await import('../../service/poller.js');
|
|
860
860
|
|
|
861
861
|
const poller = createPoller({ stateFile });
|
|
@@ -871,7 +871,28 @@ describe('poller.js', () => {
|
|
|
871
871
|
assert.strictEqual(
|
|
872
872
|
poller.shouldReprocess(item, { reprocessOn: ['attention'] }),
|
|
873
873
|
false,
|
|
874
|
-
'Should NOT reprocess when no timestamps available
|
|
874
|
+
'Should NOT reprocess when no timestamps available on either side'
|
|
875
|
+
);
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
test('shouldReprocess returns true when legacy entry has no stored feedback timestamp but current item does', async () => {
|
|
879
|
+
const { createPoller } = await import('../../service/poller.js');
|
|
880
|
+
|
|
881
|
+
const poller = createPoller({ stateFile });
|
|
882
|
+
// Legacy item processed with attention but before latestFeedbackAt was tracked
|
|
883
|
+
poller.markProcessed('pr-1', {
|
|
884
|
+
source: 'my-prs-attention',
|
|
885
|
+
itemState: 'open',
|
|
886
|
+
hasAttention: true
|
|
887
|
+
// Note: no latestFeedbackAt
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
// Item now has feedback with a timestamp (new review received)
|
|
891
|
+
const item = { id: 'pr-1', state: 'open', _has_attention: true, _latest_feedback_at: '2026-02-17T15:11:15Z' };
|
|
892
|
+
assert.strictEqual(
|
|
893
|
+
poller.shouldReprocess(item, { reprocessOn: ['attention'] }),
|
|
894
|
+
true,
|
|
895
|
+
'Should reprocess legacy entries when new feedback is detected'
|
|
875
896
|
);
|
|
876
897
|
});
|
|
877
898
|
|