Skip to content

fix(replay): bound source bundle and file counts - #5277

Merged
thymikee merged 7 commits into
fix/daybreak-daemon-boundariesfrom
fix/daybreak-replay-source-count
Dec 1, 2026
Merged

thymikee merged 7 commits into
fix/daybreak-daemon-boundariesfrom
fix/daybreak-replay-source-count

Conversation

@thymikee

@thymikee thymikee commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Bound non-local remote replay requests to 256 source bundles and 2,048 files, including empty-text files. Direct test and nested batch test steps refuse oversized suites before reading sources. Remote replay refuses oversized Maestro include closures before upload. Batch errors retain the limit counts and split-invocations hint. Local suites keep their prior count behavior. CLI help and the replay guide document the limits. This addresses the review concern on #5243 and is stacked on that PR.

Before / after

  • Before: remote batch with a 257-source test loaded sources, then failed at daemon admission.
  • After: it fails client-side before reading sources, with limitCount, totalCount, and the split hint.
  • Before: remote replay with 2,049 included files uploaded the bundle before refusal.
  • After: it fails client-side with INVALID_ARGS and the file count.

Validation

Head cc389f3. Focused packages/command-surface/src/index.test.ts passed 4/4. The previous head's focused command-surface and replay-port files passed 41/41. Current-head CI is pending. No live device validation is required for these client preflight and documentation changes. A custom transport without a daemon URL cannot be classified for client preflight; daemon admission still enforces the limits.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.73 MB 6.73 MB +1.4 kB
Package (unpacked) 6.73 MB 6.73 MB +1.4 kB
Package (download) 2.06 MB 2.06 MB +475 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 22.8 ms 34.8 ms +12.0 ms
CLI --help 60.4 ms 63.9 ms +3.6 ms

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging 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.

Apex Sentinel: 1 new finding on a70d2ea. The verdict and the full list are in the summary comment.

@thymikee

Copy link
Copy Markdown
Member Author

The code at 0b34988 is ready, and no code change is required.

Not blocking: these can be taken or left: since a remote test sends one bundle per discovered flow, even with --shard, a suite of 257+ flows that could fit before is now refused, so consider keeping the 256 limit, adding a details.hint to split the run with narrower paths or globs, and naming the 256-bundle and 2,048-file limits in the remote docs (limits); the empty-list return can be deleted; a for...in loop with an own-key check in place of Object.entries would let the file-count check run before an array is built for a whole bundle; one HTTP route test could send 257 bundles and assert INVALID_ARGS with limitCount 256 before dispatch and suite discovery; and, as a follow-up to older behavior, the client could check the request-wide byte, bundle and file totals before upload, using limits shared with the daemon.

The empty-list thread no longer applies and can be resolved, because an empty list now reaches discovery as on the base branch and a test covers it.

The cancelled Body rules run is likely unrelated: it was superseded by a body edit or re-push, and it lints the PR body, not code.

No test or build job is failing.

Before merge, Body rules must re-run green, and one other check is still queued.

Not verified here: tests were not run locally, and the 257+ flow impact assumes absolute client paths of 60-100 bytes, where about 330-540 flows fit before, so the exact earlier cut-off depends on the caller's paths.

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging 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.

Apex Sentinel: 1 new finding on 0b34988. The verdict and the full list are in the summary comment.

@thymikee
thymikee marked this pull request as ready for review November 30, 2026 19:08

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 10 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/command-surface/src/index.ts Resolved
Comment thread website/docs/docs/replay-e2e.md Resolved
Comment thread website/docs/docs/replay-e2e.md Resolved
Comment thread website/docs/docs/replay-e2e.md Resolved
@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging 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.

Apex Sentinel: 1 new finding on cb5bcee. The verdict and the full list are in the summary comment.

Comment thread packages/command-surface/src/index.ts Resolved
@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging 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.

Apex Sentinel: 1 new finding on ce90c7e. The verdict and the full list are in the summary comment.

Comment thread packages/command-surface/src/index.ts Resolved
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of cc389f3

Since the review of ce90c7e: 0 new · 0 still open · 1 no longer raised (1 marked fixed)

No open findings.

🔧 1 finding marked fixed in their threads
Finding Fixed by Where
Remote batch test count refusal loses limitCount/totalCount and the split hint thymikee cc389f3 · reply

Reviewed with this repository's own Sentinel configuration (cddba76858da).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

The code at cc389f3 is ready, with no required changes since the earlier review.

Not blocking: these can be taken or left: the count-refusal hint could say to split the inputs into separate invocations with narrower paths or globs (here and in the daemon checks), because sharding does not lower the number of inputs the client counts; the count assertions and limits could have one owner in daemon-port/script-source.ts that both sides call; and the remote check in the client, which goes by URL locality and so can refuse a forwarded non-loopback URL that the daemon would accept, needs no change now but could later key on the same marker as the daemon.

These earlier threads are fixed and can be resolved: an empty source list now returns early (thread); the client now checks counts before reading or uploading, with a hint (thread); batch now forwards context (thread, thread) and keeps inner error details (thread); the guide now covers the per-bundle limit (thread), splitting inputs (thread, with the hint wording noted above) and non-local daemons (thread); the replay writer now checks the remote file count (thread); and the tests now assert the hint (thread), assert no suite reads (thread) and use a matching name (thread).

All code jobs pass at this commit.

The Body rules check was cancelled by a superseded run, which is likely unrelated to this change, and it needs a rerun to pass before merge.

Not verified here: tests were not run locally, regression coverage was judged from the diff and the earlier code path, and third-party forwarding setups that could reach the loopback daemon listener without the proxy marker were not enumerated.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 30, 2026
@thymikee
thymikee merged commit c41ac49 into fix/daybreak-daemon-boundaries Dec 1, 2026
17 of 18 checks passed
@thymikee
thymikee deleted the fix/daybreak-replay-source-count branch December 1, 2026 06:40
thymikee added a commit that referenced this pull request Dec 1, 2026
* fix(replay): bound source bundle and file counts

* fix: let empty replay source lists reach suite discovery

* fix: preflight remote replay source counts on client

* chore: format replay source preflight

* fix(replay): enforce remote source limits in nested batch steps

* fix(replay): type structured batch regression fixture

* fix: preserve batch step error details
thymikee added a commit that referenced this pull request Dec 1, 2026
* fix(replay): bound source bundle and file counts

* fix: let empty replay source lists reach suite discovery

* fix: preflight remote replay source counts on client

* chore: format replay source preflight

* fix(replay): enforce remote source limits in nested batch steps

* fix(replay): type structured batch regression fixture

* fix: preserve batch step error details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant