Repository navigation
ci: raise the selector filter and argument bounds (ADR-0105) - #47
Conversation
ADR-0105, Accepted: layout B refused ordinary-11 at its 33,367-byte filter against ADR-0063's 32 KiB ceiling, deterministically, and no B salt fits reliably (86 of 200 fit, none under 90 percent). The filter bound is now 64 KiB and the argument vector 128 KiB; counts, salt, algorithm and job ceilings are unchanged. The plan, its validator and the four boundary controls move together, ADR-0063 gains Amendment 4, and the acceptance record owns the measurements. Hosted A and B qualification is still owed. ADR: 0105 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Note The title starts with
|
Reviewer's GuideImplementationPin plan validation to the accepted 64 KiB filter and 128 KiB argument-vector bounds so plans with different limits are refused.
ConfigurationRaise the committed shard-plan bounds to match the newly accepted selector-filter and argument-vector ceilings.
DocumentationRecord ADR-0105, its supersession of ADR-0063’s initial bounds, and the decision index entry.
Add the ADR-0105 acceptance and implementation record, including measurements and the outstanding hosted qualification gate.
TestsMove shard boundary and oversize-filter controls to the new limits while preserving refusal behavior.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="scripts/test-ci-test-shards.py" line_range="368" />
<code_context>
expression = OWNER.filter_for('ordinary-0', 'tests', cases, self.plan)
- cases[-1]['method'] += 'x' * (32768 - len(expression.encode()))
- self.assertEqual(32768, len(OWNER.filter_for('ordinary-0', 'tests', cases, self.plan).encode()))
+ cases[-1]['method'] += 'x' * (65536 - len(expression.encode()))
+ self.assertEqual(65536, len(OWNER.filter_for('ordinary-0', 'tests', cases, self.plan).encode()))
cases[-1]['method'] += 'x'
</code_context>
<issue_to_address>
**Shard boundary test fails**
When the shard test suite runs the new 64-KiB boundary control, `filter_for` validates the cases before checking the filter size, so the padded final method is rejected as `selector_unsupported` rather than reaching the expected `filter_bound`; the boundary test fails.
Build the boundary expression using multiple methods whose individual lengths remain within the selector limit.
</issue_to_address>
### Comment 2
<location path="scripts/ci-test-shards.py" line_range="100" />
<code_context>
require(plan['salt'] == 'LearnStack.CI.B.v1' and integer(plan['defaultMethodMs'], 1, 86400000),
'plan_estimate_invalid')
- require(plan['bounds'] == {'filterBytes': 32768, 'argvBytes': 65536}
+ require(plan['bounds'] == {'filterBytes': 65536, 'argvBytes': 131072}
and all(type(x) is int for x in plan['bounds'].values()), 'plan_bounds_invalid')
sources = plan['sources']
</code_context>
<issue_to_address>
**Hosted test discovery fails**
When the hosted `dotnet test` or vendor-host chain rejects or alters selector filters above 32 KiB, `selected_discovery` and `shard_dotnet` pass the larger filter to `dotnet test`; discovery then fails, leaving the shard run incomplete or red. There is no smaller-filter fallback, and selection correctly does not run unfiltered.
Keep the selector limit at 32 KiB unless the hosted test chain is verified to support larger filters.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: scripts/test-ci-test-shards.py:368, scripts/ci-test-shards.py:100
Record PR #46's merge, the final-head layout A run beside the four hosted-only faults the pull request exposed, and the evidence that stays open: layout-B and pair qualification (the filter ceiling is ADR-0105, PR #47), the maintainer items and the pre-commit worktree note. Mark P03-9 complete in the phase Status block and close G13 and G14's rows, bring the README's Identity row up to the delivered packet and point the ADR-0099 index row at Amendments 10 to 13. ADR: 0069 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PR #47 merged as 8ac1428. The record carries the hosted layout A and B result on the reviewed source, a direct 64 KiB and 131,000-byte filter check on the runner image, the Sourcery dispositions, the unfinished runs on the merge commit and on main after #46, and why the P03-9 pair gap stays open. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary
Raises the two argument bounds of the complete bounded CI shards, under
ADR-0105 (Accepted by the
maintainer 2026-11-21) and a dated Amendment 4 in
ADR-0063: the generated selector
filter goes from 32 KiB to 64 KiB and all argument strings of one invocation from 64 KiB to
128 KiB. Counts, the assignment algorithm, the B salt, weights and every job ceiling are
unchanged, and an oversize filter is still refused before spawning, never split and never
run unfiltered.
This PR is stacked on #46. It targets
mainbecauseci.ymlruns only for pull requestsinto
main, so its file list repeats #46's until that merges. Its own change is onecommit,
76501822. Review that commit; merge #46 first.Why
The first hosted layout B run of the P03-9 source (#46, head
82d18d8d) refusedbackend-ordinary-11withfilter_boundbefore any test ran: its filter is 33,367 bytesagainst the 32,768-byte ceiling, and
ordinary-7is at 31,989. The assignment isdeterministic from the manifest and the plan, so no rerun can pass. Layout A passes the same
source in 27,144 to 28,123 bytes.
A new B salt was the cheap route and measurement ruled it out. Over 200 candidate salts on
the current population the largest filter has a median of 33,070 bytes; 86 of 200 fit, none
stays under 90 % and the best reaches 91.8 %. The assignment is hash-ordered, so each added
selector reshuffles it and a salt fitted to today's population is a fresh draw tomorrow.
The population is 2,052 distinct ordinary selectors across twelve shards, the Accepted upper
count, so growth shows up as longer filters. A byte-aware assignment is the valid alternative
the ADR records and does not select: it leaves about 16 % of growth.
What changes
scripts/ci-test-shards-plan.jsonand the pin invalidate_plan: 65,536-byte filter,131,072-byte argument vector.
scripts/test-ci-test-shards.py: the boundary controls (exact boundary accepted, one bytemore refused, oversize refused instead of splitting, launcher refuses before spawn) move to
the new values.
Phase 03 delivery log.
Verification
accepted (largest 28,123 bytes, 43 % of the new bound), every layout-B filter is accepted
(largest 33,367 bytes, 51 %) and the two layouts stay distinct.
make lint-docspasses.Hosted qualification (done)
Run
44909390165, head76501822, same source in every attempt:backend-ordinary-11, the shard that layout Brefused at 33,367 bytes before this change. A filter above 32 KiB passes the hosted test
chain, and the independent rediscovery of each filter held.
readiness timeout in
ordinary-1(TLS, 120 s) and a frontend development-server test(
bff-development-diagnostics-counter) with no frontend file in the change.Left for after the merge
layout-B line at it. That is a docs commit after the merge, so this PR does not burn
another CI cycle on a record.
🤖 Generated with Claude Code
Summary by Sourcery
Increase the complete bounded CI shard limits to support larger selector filters and argument vectors without changing shard assignment or safety guarantees.
Bug Fixes:
Enhancements:
Documentation:
Tests:
Summary by CodeRabbit