Skip to content

test: benchmark independent list discovery costs - #116

Merged
abruption merged 3 commits into
mainfrom
research/102-list-scaling
Oct 9, 2026
Merged

abruption merged 3 commits into
mainfrom
research/102-list-scaling

Conversation

@abruption

@abruption abruption commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Measure the bounded current list implementation before changing independent transcript discovery.

Closes #102.

The repository-only harness varies N locks and T transcript files independently, including sparse/nested roots, small/64-KiB transcripts, real versus fixed diagnostic children, and default versus internal zero-window controls. Three fresh-process repetitions report elapsed variation, traversal/read/spawn counts, directory/FD/resource peaks, and cleanup. Real native guards/flock remain enabled. It asserts complete sorted results, four-worker bounds, fixture file invariance, whole-command refusal for injected discovery failure, and unknown/unsafe sessions when a native coordinator is missing.

The corrected cross-root Darwin arm64 / Node 24.16 measurement takes 7.159 seconds for the standard suite. Baseline N=4/T=512 is 19.294 ms; N=32 is 89.136 ms; T=2048 is 35.196 ms; actual ps/lsof is 305.679 ms; the default 1000-ms window is 1024.320 ms. Matching transcripts alternate across sessions and archived_sessions, and every result must resolve to the expected path; this addresses the automatic review finding on the initial fixture. The document records min/max variation and follow-up requirements for larger fixtures and per-call shared discovery. The decision remains to retain fresh bounded observations; these small fixtures do not justify a persistent stale cache.

This is not a cold-cache claim: fixtures are hashed before timing, and OS caches are not flushed. macOS reports tracked directory handles rather than total FDs; Linux FD sampling may miss short peaks. CPU/RSS exclude diagnostic subprocesses. The 15-second quick / 60-second standard budgets bound verification, and dedicated Linux/macOS Node 22/24 CI jobs retain quick measurements.

Validation: npm ci, type checking, lint, all 218 tests, package smoke, standard/quick measurement, and git diff --check passed locally. No runtime behavior, package surface, user Codex home, live session, release, or publication is changed. This is the fourth independent PR in the requested #99 → #101 → #100 → #102 development order; CI-file changes should be reconciled in that order before merging. No merge is requested.

Current head 5cd9db03b10aec8f5d4083d219253c25ceb08220 passed all 27 reported checks, including CI run 37864310247 and all four Linux/macOS Node 22/24 quick measurement jobs. The visible Codex review summary names initial head 2d0c527; its coverage is not claimed for this corrected head. Its cross-root fixture finding was addressed with path assertions, local reruns, and the current-head CI. PR creation triggers Codex review automatically; no further reviewer mentions will be posted. This PR remains open for human review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T00:18:58.142079Z 2d0c527 PR opened
🔒 Security Review ✅ Completed 2026-10-09T00:16:00.954304Z 2d0c527 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d0c527a79

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/benchmark-list.mjs Outdated
const paddingRecord = padding => `${JSON.stringify({ type: "benchmark_padding", payload: padding })}\n`;
const overheadBytes = paddingRecord("").length + record.length;
for (let index = 0; index < config.t; index += 1) {
const tree = index < config.n || index % 2 === 0 ? "sessions" : "archived_sessions";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distribute matching transcripts across both roots

When discovery of archived-only transcripts regresses, this benchmark still passes because index < config.n forces every transcript corresponding to a listed lock into sessions; only unrelated noise reaches archived_sessions. This leaves the documented cross-root coverage untested, so alternate the N matching transcripts between both roots while continuing to distribute the remaining T−N noise.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Addressed in the new commit: matching and noise transcripts alternate across both roots, and each listed result must resolve to its expected root/path. All 218 tests, package smoke, and corrected standard/quick benchmark pass locally; the report now records corrected measurements and variation. No runtime optimization was introduced.

@abruption
abruption merged commit aa25390 into main Oct 9, 2026
32 checks passed
@abruption
abruption deleted the research/102-list-scaling branch October 9, 2026 05:21
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.

[P3] Benchmark list scaling before changing independent transcript discovery

1 participant