feat(cli): add per-contract polling interval overrides - #261
Stephan-Thomas wants to merge 5 commits into
Conversation
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
📝 WalkthroughWalkthroughIntroduces a centralized ChangesLive migration centralization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@Stephan-Thomas Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/core/watch.ts (1)
152-158: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPersist the override before the cache fast-path returns.
When the introspection cache is valid,
watchContractexits before thisinsertContractruns. Sowatch <id> --poll-interval 300on an already watched contract reports success but never saves the new override unless the caller also setsforceRefresh.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/core/watch.ts` around lines 152 - 158, Persist the updated poll interval before the cache fast-path in watchContract, because the current early return prevents insertContract from running when the introspection cache is valid. Move the contract persistence logic so it runs before the cached success return, or otherwise ensure the override is saved regardless of whether forceRefresh is set. Use watchContract and insertContract as the key symbols to update the flow.src/daemon/loop.ts (1)
69-80: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftRecompute the daemon interval after overrides change.
effectiveIntervalMsis resolved only once during startup, and the timer is never rescheduled afterward. If a user adds, removes, or editspoll_interval_secondswhile the daemon is running, the live loop keeps the old cadence until restart.Also applies to: 246-257
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/daemon/loop.ts` around lines 69 - 80, The daemon loop in scheduledTick/executeCycle is only using resolvePollIntervalMs once at startup, so changes to poll_interval_seconds are never reflected while the process runs. Update the timing logic in src/daemon/loop.ts so the active interval is recalculated after each cycle or when overrides change, and reschedule the setInterval/timeout based on the new value. Make sure the same fix is applied to the repeated scheduling path referenced by the Daemon loop so the cadence can change without restarting.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/db/repositories.ts`:
- Around line 101-106: The upsert in repositories.ts is preventing
`watchContract` from clearing an existing `poll_interval_seconds` override
because `COALESCE(excluded.poll_interval_seconds,
contracts.poll_interval_seconds)` keeps the old value when `null` is passed.
Update the `ON CONFLICT` handling in the repository write path so an explicit
`null` from `watchContract` actually overwrites the stored value and restores
adaptive polling, while still preserving the existing value only when the field
is omitted. Use the `watchContract` call site and the contracts upsert logic as
the key places to align this behavior.
---
Outside diff comments:
In `@src/core/watch.ts`:
- Around line 152-158: Persist the updated poll interval before the cache
fast-path in watchContract, because the current early return prevents
insertContract from running when the introspection cache is valid. Move the
contract persistence logic so it runs before the cached success return, or
otherwise ensure the override is saved regardless of whether forceRefresh is
set. Use watchContract and insertContract as the key symbols to update the flow.
In `@src/daemon/loop.ts`:
- Around line 69-80: The daemon loop in scheduledTick/executeCycle is only using
resolvePollIntervalMs once at startup, so changes to poll_interval_seconds are
never reflected while the process runs. Update the timing logic in
src/daemon/loop.ts so the active interval is recalculated after each cycle or
when overrides change, and reschedule the setInterval/timeout based on the new
value. Make sure the same fix is applied to the repeated scheduling path
referenced by the Daemon loop so the cadence can change without restarting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 64940b8b-4368-422b-a3e4-d84fef931f51
📒 Files selected for processing (8)
src/core/watch.tssrc/daemon/loop.tssrc/db/database.tssrc/db/repositories.tssrc/db/schema.sqltests/core/watch.test.tstests/daemon/loop.test.tstests/db/introspection_cache.test.ts
📜 Review details
⚠️ CI failures not shown inline (2)
GitHub Actions: CI Pipeline / build-and-test (22.x): feat(cli): add per-contract polling interval overrides
Conclusion: failure
2m�[39m
�[41m�[1m FAIL �[22m�[49m tests/db/alert_delivery.test.ts�[2m > �[22mgetUndeliveredAlerts�[2m > �[22mDelivered filtering�[2m > �[22mdoes not exclude resolved alerts — resolved != delivered
�[31m�[1mSqliteError�[22m: no such table: contracts�[39m
�[90m �[2m❯�[22m Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:�[2m5:21�[22m�[39m
�[36m �[2m❯�[22m insertContract src/db/repositories.ts:�[2m98:8�[22m�[39m
�[90m 96| �[39m// ---------------------------- Database Access Functions For Schema: …
�[90m 97| �[39mexport function insertContract(db: Database.Database, contract: {id: s…
�[90m 98| �[39m db�[33m.�[39m�[34mprepare�[39m(�[32m`
�[90m | �[39m �[31m^�[39m
�[90m 99| �[39m INSERT INTO contracts (id, name, network, wasm_hash, tags, pol…
�[90m100| �[39m VALUES (`@id`, `@name`, `@network`, `@wasm_hash`, `@tags`, `@poll_interva`…
�[90m �[2m❯�[22m seedFull tests/db/alert_delivery.test.ts:�[2m41:5�[22m�[39m
�[90m �[2m❯�[22m tests/db/alert_delivery.test.ts:�[2m245:33�[22m�[39m
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[204/310]⎯�[22m�[39m
�[41m�[1m FAIL �[22m�[49m tests/db/alert_delivery.test.ts�[2m > �[22mgetUndeliveredAlerts�[2m > �[22mMultiple alerts per contract/entry�[2m > �[22mreturns one row per alert_fired record, not per contract
�[31m�[1mSqliteError�[22m: no such table: contracts�[39m
�[90m �[2m❯�[22m Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:�[2m5:21�[22m�[39m
�[36m �[2m❯�[22m insertContract src/db/repositories.ts:�[2m98:8�[22m�[39m
�[90m 96| �[39m// ---------------------------- Database Access Functions For Schema: …
�[90m 97| �[39mexport function insertContract(db: Database.Database, contract: {id: s…
�[90m 98| �[39m db�[33m.�[39m�[34mprepare�[39m(�[32m`
�[90m | �[39m �[31m^�[39m
�[90m 99| �[39m INSERT INTO contracts (id, name, network, wasm_hash, tags, pol…
�[90m100| �[39m VALUES (`@id`, `@name`, `@network`, `@wasm_hash`, ...
GitHub Actions: CI Pipeline / 0_build-and-test (22.x).txt: feat(cli): add per-contract polling interval overrides
Conclusion: failure
2m�[39m
�[41m�[1m FAIL �[22m�[49m tests/db/alert_delivery.test.ts�[2m > �[22mgetUndeliveredAlerts�[2m > �[22mDelivered filtering�[2m > �[22mdoes not exclude resolved alerts — resolved != delivered
�[31m�[1mSqliteError�[22m: no such table: contracts�[39m
�[90m �[2m❯�[22m Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:�[2m5:21�[22m�[39m
�[36m �[2m❯�[22m insertContract src/db/repositories.ts:�[2m98:8�[22m�[39m
�[90m 96| �[39m// ---------------------------- Database Access Functions For Schema: …
�[90m 97| �[39mexport function insertContract(db: Database.Database, contract: {id: s…
�[90m 98| �[39m db�[33m.�[39m�[34mprepare�[39m(�[32m`
�[90m | �[39m �[31m^�[39m
�[90m 99| �[39m INSERT INTO contracts (id, name, network, wasm_hash, tags, pol…
�[90m100| �[39m VALUES (`@id`, `@name`, `@network`, `@wasm_hash`, `@tags`, `@poll_interva`…
�[90m �[2m❯�[22m seedFull tests/db/alert_delivery.test.ts:�[2m41:5�[22m�[39m
�[90m �[2m❯�[22m tests/db/alert_delivery.test.ts:�[2m245:33�[22m�[39m
�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[204/310]⎯�[22m�[39m
�[41m�[1m FAIL �[22m�[49m tests/db/alert_delivery.test.ts�[2m > �[22mgetUndeliveredAlerts�[2m > �[22mMultiple alerts per contract/entry�[2m > �[22mreturns one row per alert_fired record, not per contract
�[31m�[1mSqliteError�[22m: no such table: contracts�[39m
�[90m �[2m❯�[22m Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:�[2m5:21�[22m�[39m
�[36m �[2m❯�[22m insertContract src/db/repositories.ts:�[2m98:8�[22m�[39m
�[90m 96| �[39m// ---------------------------- Database Access Functions For Schema: …
�[90m 97| �[39mexport function insertContract(db: Database.Database, contract: {id: s…
�[90m 98| �[39m db�[33m.�[39m�[34mprepare�[39m(�[32m`
�[90m | �[39m �[31m^�[39m
�[90m 99| �[39m INSERT INTO contracts (id, name, network, wasm_hash, tags, pol…
�[90m100| �[39m VALUES (`@id`, `@name`, `@network`, `@wasm_hash`, ...
🧰 Additional context used
🪛 GitHub Actions: CI Pipeline / 0_build-and-test (22.x).txt
tests/db/introspection_cache.test.ts
[error] 49-49: Schema assertion failed: expected contracts table_info(PRAGMA table_info(contracts)) column names to include 'last_introspected_at', but received []
src/db/repositories.ts
[error] 98-98: SqliteError: no such table: contracts (failed during insertContract db.prepare INSERT INTO contracts …)
[error] 672-672: SqliteError: no such table: alerts_fired (failed during countUndeliveredAlerts db.prepare SELECT COUNT(*) FROM alerts_fired …)
[error] 495-495: SqliteError: no such table: cost_daily_snapshots (failed during getContractCostSummary db.prepare SELECT … FROM cost_daily_snapshots …)
[error] 556-556: SqliteError: no such table: extension_history (failed during getAverageResourceUsage db.prepare SELECT … FROM extension_history …)
[error] 118-118: SqliteError: no such table: contracts (failed during getContract db.prepare('SELECT * FROM contracts WHERE id = ?').get(id))
🪛 GitHub Actions: CI Pipeline / build-and-test (22.x)
tests/db/introspection_cache.test.ts
[error] 49-51: Assertion failed: expected schema columns to include 'last_introspected_at', but received []. (Underlying DB failure indicates contracts table/schema is missing.)
src/db/repositories.ts
[error] 98-100: SqliteError: no such table: contracts while running insertContract. Attempted query: INSERT INTO contracts (id, name, network, wasm_hash, tags, poll_interval, ...).
[error] 672-672: SqliteError: no such table: alerts_fired while running countUndeliveredAlerts. Attempted query selects COUNT(*) FROM alerts_fired.
🪛 GitHub Check: build-and-test (22.x)
src/db/repositories.ts
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Delivered flag management > does not re-deliver already-delivered alerts
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:253:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Delivered flag management > does NOT mark as delivered when send fails
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:241:38
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Delivered flag management > marks the alert as delivered in the DB after successful send
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:229:38
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Channel routing > calls sendSlackAlert with the correct channel and event
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:209:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Channel routing > calls sendWebhookAlert with the correct URL, event payload, and secret
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:181:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Channel routing > routes pagerduty alerts to sendPagerDutyAlert
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:166:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Channel routing > routes slack alerts to sendSlackAlert
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:151:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
[failure] 98-98: tests/alerts/dispatcher.test.ts > deliverPendingAlerts > Channel routing > routes webhook alerts to sendWebhookAlert
SqliteError: no such table: contracts
❯ Database.prepare node_modules/better-sqlite3/lib/methods/wrappers.js:5:21
❯ Module.insertContract src/db/repositories.ts:98:8
❯ seedContractWithAlert tests/alerts/dispatcher.test.ts:52:5
❯ tests/alerts/dispatcher.test.ts:137:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'SQLITE_ERROR' }
|
Hi @Stephan-Thomas, the CI is failing because \src/db/schema.sql\ was accidentally emptied out (0 bytes) in your branch, probably due to encoding corruption or an accidental overwrite. |
|
Done @AbdulmalikAlayande |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/db/schema.sql`:
- Around line 7-11: Remove the duplicated poll_interval_seconds column from the
contracts table definition in the schema.sql create statement. Keep only the
existing poll_interval_seconds field already present in the table schema and
ensure the CREATE TABLE contracts block has unique column names throughout.
Verify the schema initialization path that uses contracts no longer triggers a
duplicate column name error.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b5d15ab9-88f2-47b5-855a-38e57afa98b9
📒 Files selected for processing (1)
src/db/schema.sql
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: build-and-test (22.x)
🧰 Additional context used
🪛 SQLFluff (4.2.2)
src/db/schema.sql
[error] 171-172: Too many consecutive blank lines.
(LT15)
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/db/database.ts`:
- Around line 68-79: The LIVE_MIGRATIONS try/catch loop is duplicated in
getDatabase and getDatabaseForTesting, so extract the shared migration runner
into a helper such as applyLiveMigrations(db) in src/db/database.ts and call it
from both functions. Move the existing duplicate-column filtering and
db.exec(sql) execution into that helper so the error-handling logic lives in one
place and stays consistent if it changes later.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d144e54f-1413-4f8a-ad7a-7e8ca654ba57
📒 Files selected for processing (1)
src/db/database.ts
📜 Review details
⚠️ CI failures not shown inline (2)
GitHub Actions: CI Pipeline / 0_build-and-test (22.x).txt: feat(cli): add per-contract polling interval overrides
Conclusion: failure
##[group]Run npm run lint
�[36;1mnpm run lint�[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
> sorokeep@0.1.2 lint
> eslint src/ tests/
/home/runner/work/sorokeep/sorokeep/src/alerts/keys.test.ts
##[warning] 7:10 warning 'KeychainStore' is defined but never used `@typescript-eslint/no-unused-vars`
##[warning] 30:58 warning 'service' is defined but never used `@typescript-eslint/no-unused-vars`
/home/runner/work/sorokeep/sorokeep/src/core/discovery.ts
##[warning] 268:10 warning 'buildContractDataKey' is defined but never used `@typescript-eslint/no-unused-vars`
/home/runner/work/sorokeep/sorokeep/src/rpc/client.ts
##[warning] 11:5 warning 'FeeBumpTransaction' is defined but never used `@typescript-eslint/no-unused-vars`
##[warning] 15:10 warning 'CostSummary' is defined but never used `@typescript-eslint/no-unused-vars`
##[error] 797:11 error Duplicate name 'submitRestore' no-dupe-class-members
GitHub Actions: CI Pipeline / build-and-test (22.x): feat(cli): add per-contract polling interval overrides
Conclusion: failure
##[group]Run npm run lint
�[36;1mnpm run lint�[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
> sorokeep@0.1.2 lint
> eslint src/ tests/
/home/runner/work/sorokeep/sorokeep/src/alerts/keys.test.ts
##[warning] 7:10 warning 'KeychainStore' is defined but never used `@typescript-eslint/no-unused-vars`
##[warning] 30:58 warning 'service' is defined but never used `@typescript-eslint/no-unused-vars`
/home/runner/work/sorokeep/sorokeep/src/core/discovery.ts
##[warning] 268:10 warning 'buildContractDataKey' is defined but never used `@typescript-eslint/no-unused-vars`
/home/runner/work/sorokeep/sorokeep/src/rpc/client.ts
##[warning] 11:5 warning 'FeeBumpTransaction' is defined but never used `@typescript-eslint/no-unused-vars`
##[warning] 15:10 warning 'CostSummary' is defined but never used `@typescript-eslint/no-unused-vars`
##[error] 797:11 error Duplicate name 'submitRestore' no-dupe-class-members
🧰 Additional context used
🪛 OpenGrep (1.23.0)
src/db/database.ts
[ERROR] 70-70: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
[ERROR] 160-160: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
🔇 Additional comments (3)
src/db/database.ts (3)
70-70: Static analysis false positive: notchild_process.exec.The OpenGrep hint about "dynamic command passed to
child_process.exec" is a false positive —db.exec(sql)here isbetter-sqlite3'sDatabase.prototype.exec, not Node'schild_process.exec. No command injection risk since this executes fixed SQL strings against a local SQLite connection, not shell commands.Also applies to: 160-160
28-46: CentralizedLIVE_MIGRATIONSmatches PR objectives.The
poll_interval_secondscolumn addition (Line 33) correctly implements the schema change required by the linked issue, and thechannel_accountstable creation preserves prior behavior.
71-78: 🩺 Stability & AvailabilityNo change needed The live migrations already correspond to
schema.sql, andgetDatabaseForTesting()uses the same migration set.
Closes #149