test: cover Jules activity normalization - #79
Conversation
Co-authored-by: Parvez Kose <koseparvez@gmail.com>
Co-authored-by: Parvez Kose <koseparvez@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@cursoragent I didn't quite get this test |
|
The mutation isn’t in the fixture itself; it was a local/manual mutation of the production normalization code to validate that the test would fail if the fallback were removed. Relevant path:
So if someone mutates the adapter from: a.role ?? a.author ?? "agent"to something like: a.role ?? "agent"then that second activity has no Suggested reply:
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Internal change — no release note. Generated by Claude Code |


Summary
realJulesPort.listActivitiesrequest wiring.role/author,content/message, andtimestamp/createTime) normalize into stable agent/human messages.Risky behavior now covered
Jules activity responses feed the session conversation drawer. Field-name or role-normalization regressions could silently hide content or misattribute user messages as agent output.
Test files added
test/jules-port-activities.test.tsRegression value
The fixture exercises every existing normalization fallback in one API-boundary test without a live Jules dependency. A mutation that removed the
authorfallback changed aUSERactivity toagentand failed the test, demonstrating that it detects a materially user-visible regression.Validation
npm test -- test/jules-port-activities.test.ts(1/1 passed)npm test(36/36 passed)npm run buildnpx prettier --check test/jules-port-activities.test.ts