Skip to content

chore(tests): add forensics ops to run-sdk harness#14

Merged
caballeto merged 1 commit into
mainfrom
chore/parity-forensics-harness
May 4, 2026
Merged

chore(tests): add forensics ops to run-sdk harness#14
caballeto merged 1 commit into
mainfrom
chore/parity-forensics-harness

Conversation

@caballeto
Copy link
Copy Markdown
Member

Summary

Adds 5 dispatch cases in test/run-sdk.mjs for the new forensics resource (design 046, shipped in v0.6.0):

  • forensics.incident-timelineclient.forensics.incidentTimeline
  • forensics.check-traceclient.forensics.checkTrace
  • forensics.policy-snapshotclient.forensics.policySnapshot
  • forensics.monitor-rule-evaluationsclient.forensics.monitorRuleEvaluations
  • forensics.monitor-transitionsclient.forensics.monitorTransitions

Paginated ops accept an optional JSON-encoded filter as the second arg (same convention as monitors.results / monitors.versions).

Why

The Forensics resource was added to the SDK in v0.6.0 but the harness was never updated, causing the monorepo parity check (TestHarnessCompleteness::test_sdk_js_harness_complete) to fail after the release (failed run).

Paired with corresponding harness fixes in devhelmhq/sdk-python and a parity-classification PR in devhelmhq/mono.

Test plan

  • Verified client.forensics.{incidentTimeline,checkTrace,policySnapshot,monitorRuleEvaluations,monitorTransitions} are all functions on a real instance
  • Mono parity tests (TestHarnessCompleteness::test_sdk_js_harness_complete) pass locally with this branch checked out as the SDK source
  • CI lint/typecheck in this repo

Made with Cursor

The Forensics resource (design 046) was added to the SDK in v0.6.0 but the
test harness was never updated to dispatch the 5 ops, which caused the
mono parity check (TestHarnessCompleteness) to fail after the release.

Adds dispatch cases for:
  - forensics.incident-timeline       → client.forensics.incidentTimeline
  - forensics.check-trace             → client.forensics.checkTrace
  - forensics.policy-snapshot         → client.forensics.policySnapshot
  - forensics.monitor-rule-evaluations → client.forensics.monitorRuleEvaluations
  - forensics.monitor-transitions     → client.forensics.monitorTransitions

The paginated ops accept an optional JSON-encoded filter object as a
second arg, matching the existing monitors.results / monitors.versions
convention.

Co-authored-by: Cursor <cursoragent@cursor.com>
@caballeto caballeto merged commit 1d71823 into main May 4, 2026
3 checks passed
@caballeto caballeto deleted the chore/parity-forensics-harness branch May 4, 2026 14:58
caballeto added a commit that referenced this pull request May 5, 2026
…ing (#16)

`Monitor.currentStatus` is computed by the probe pipeline and isn't
populated on a freshly-created monitor, so a fresh dev who logs it
straight after `client.monitors.create()` sees `undefined`. Wrap the
generated `MonitorDto` so the field is surfaced as `string | null` with
a doc comment that explains the timing, and update the README quickstart
with a one-line note + `?? 'PENDING'` display pattern so the example
doesn't read as broken.

Round-2 DevEx friction P2 #14.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant