Skip to content

test(sessions): cover reading Qoder and Qoder CN transcripts (#1418) - #1679

Merged
SaulMoro merged 2 commits into
Tencent:mainfrom
Walternater:qoder-adapter-test
Nov 3, 2026
Merged

SaulMoro merged 2 commits into
Tencent:mainfrom
Walternater:qoder-adapter-test

Conversation

@Walternater

Copy link
Copy Markdown
Collaborator

#1571 landed the Qoder / Qoder CN session platforms and their store resolution (locate-matrix, locate-sessions, TOOLS, README, tool-support). This adds the adapter-level behaviour tests it did not carry — the read path a member actually hits, not just where the store resolves.

Test-only: no production code changes.

What it covers

  • A Qoder transcript under ~/.qoder/projects reads through the registry adapter: the listing names the file, readSession returns the two-message chain, and readSubagents reads <id>/subagents/ with its meta (toolUseId, finished).
  • A Qoder CN transcript reads from ~/.qoder-cn/projects.
  • The two relocation shapes feat(session): read Qoder and Qoder CN sessions #1571 documents — QODER_CONFIG_DIR moving the store, QODER_CLI_HOME naming the parent of .qoder — exercised end to end through ADAPTER_REGISTRY.qoder() (locate tests pin the path; these pin that the adapter reads from it).
  • Tool/platform credit: platformForTool('qoder') === 'qoder', toolForPlatform('qoder-cn') === 'qoder-cn'.

Testing

  • npx vitest run qoder-adapter agent-session-subagents tclaude-tcodex session-platform-facts → 25 tests pass.
  • tsc / lint clean (docs check included).
  • No real-CLI record: test-only diff, nothing runtime changes.

Follow-up of #1418; complements #1571. I closed my own overlapping implementation (#1661) when #1571 landed.

…#1418)

Tencent#1571 landed the Qoder/Qoder CN session platforms and their store
resolution. This adds the adapter-level behaviour tests it did not carry:

- a Qoder transcript under ~/.qoder/projects reads through the registry
  adapter (the file path the listing names, the two-message chain), and
  its subagents under <id>/subagents/ read with their meta;
- a Qoder CN transcript reads from ~/.qoder-cn/projects;
- QODER_CONFIG_DIR moves the store, and QODER_CLI_HOME names the parent
  of .qoder — the two relocation shapes Tencent#1571 documents resolved through
  locate tests, exercised here through the adapter the app uses.

test-only: no production code changes.

@SaulMoro SaulMoro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was generated by AI during triage.

The new tests read well. They go through ADAPTER_REGISTRY the way a member's read does, cover both stores, the meta of a spawned agent, and both relocation variables (QODER_CLI_HOME naming the parent), and stub every QODER* variable so a developer's own install does not leak in. Tests only, so no real-CLI record is needed.

[P1 blocking] Revert the package-lock.json change

The lock change is not part of "test-only": it removes the 8 libc entries (glibc / musl) from the @oxlint/binding-linux-* packages. Nothing in the tests needs it; it is what an npm that does not write libc produces on npm install. Without those entries, npm on Linux can no longer tell the glibc and musl bindings apart, so CI and every Linux contributor's npm ci install both. This breaks the Code Review Rules item "Changes must be surgical. Every changed line should trace directly to the PR's stated goal". git checkout origin/main -- package-lock.json and a push fixes it.

[P3 nit] The session id is not a UUID

SID's last group, 0000000000d0de, has 14 hex digits where a UUID has 12. Nothing checks it today, but a real Qoder id would not look like that.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] Revert unrelated lockfile changes — package-lock.json:1819: The diff removes eight platform packages’ libc constraints and adds unrelated peer flags, neither of which supports the Qoder adapter tests. This violates the review rule requiring surgical changes tied to the PR’s stated goal.

The description documents sufficient testing for the test changes: targeted Vitest results, type checking, and lint. No runtime behavior change is evident, so no real-CLI record is required.

No other confident findings. Nothing was run, built, or installed.

@SaulMoro

SaulMoro commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

I pushed 4c10122 on top of your branch to close the two open items, so this can land:

  • package-lock.json is back to the base version. The PR now changes only src/__tests__/qoder-adapter.test.ts.
  • SID is a valid UUID (c0ffee00-0000-4000-8000-00000000d0de).

Locally: npm run typecheck and npm run lint pass, and npx vitest run src/__tests__/qoder-adapter.test.ts passes 5/5. This PR touches tests only, so no real-CLI record is needed. I will approve and squash-merge once CI is green on this head. Thanks for the tests.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

No new confident findings in the specified diff.

  • Resolved: The earlier lockfile finding is fixed; package-lock.json is no longer changed.
  • Testing: The description records 25 passing targeted tests, type checking, and lint. The diff adds only tests, so no real-CLI verification record is required.

Nothing was run, built, or installed from the PR.

@SaulMoro SaulMoro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was generated by AI during triage.

Approving at 4c10122. CI is green, the lockfile is unchanged and the session id is a valid UUID, so both earlier items are resolved. Thanks for the tests.

@SaulMoro
SaulMoro merged commit 87c79fd into Tencent:main Nov 3, 2026
18 checks passed
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.

3 participants