Fix BidCliq compliance suite fixtures#5308
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
There was a problem hiding this comment.
LGTM. Follow-ups noted below. Right shape: new seed_account mirrors the existing seed_creative_format pattern, idempotency contract is explicit, and the 3.0-compat path now prefers session-scoped accounts before falling back to the fixture pool so the seed flow works in both compat windows.
Things I checked
seedAccountFixtureatserver/src/training-agent/account-handlers.ts:456— auth guard (durableAccountIdentityError) matcheshandleSyncAccounts/handleListAccountsgate; defaults (billing=operator, status=active, paymentTerms=net_30, accountScope=operator_brand, rateCard=sandbox, sandbox=true) match the sandbox path inhandleSyncAccounts.handleListAccounts3.0-compat ternary atserver/src/training-agent/account-handlers.ts:1067-1075—preferFixtureAccounts && scopedAccounts.length > 0now returns seeded accounts; existing fallback togetComplianceAccounts()preserved. Test exercises both 3.1 and 3.0 paths and confirmshas_more=true+ cursor onmax_results=2.- Schema if/then at
static/schemas/source/compliance/comply-test-controller-request.json:363-383— same shape as the otherseed_*conditionals; requiresparams.account_id, leavesfixturepermissive.scenarioistype: string(no enum), so additive by construction. audit-oneof.mjsunaffected — new construct isif/theninsideallOf, not aoneOf; baselinescripts/oneof-discriminators.baseline.jsondoes not need to move.start_time: \"asap\"in the state-machine storyboard validates againststatic/schemas/source/core/start-timing.json(oneOfincludesconst: \"asap\"). Clean substitution for the hardcoded ISO timestamp.- Scenario count assertion at
server/tests/unit/comply-test-controller.test.ts:199lifted from 19 → 20; LOCAL_SCENARIOS, get_adcp_capabilities, and tenant router scenario lists all updated consistently.
Follow-ups (non-blocking — file as issues)
- Pagination storyboard now under-tests its own name.
static/compliance/source/universal/pagination-integrity-list-accounts.yamldropped both thehas_more=false+ cursor-absence terminal-page assertion and thetotal_count == 3invariant — thefield_value_or_absentchecks are gone. The justification ("agents may have pre-existing sandbox accounts") is undercut by the same diff turning oncontroller_seeding: true, which is exactly the session-isolation precondition that made the terminal assertion safe in the siblingpagination-integrity.yaml(list_creatives) storyboard. Either rename topagination-integrity-list-accounts-continuationto match what it actually validates, or restore the terminal-page + total_count checks under the session-isolation predicate. As-is, the storyboard no longer catches the under-reporting failure mode it exists to detect. - Changeset is empty; prior art was
minor.feat(compliance): add seed_creative_format(PR #3114, commit926b07935) shipped aminorchangeset for the structurally identical change — new scenario value + newif/thenin the published comply controller schema. The "runners MUST accept unknown scenario strings" rule governs consumers, not the spec's own version bookkeeping. Either justify the empty bump in.changeset/wild-rocks-yell.md(the issue-5228 changeset is the precedent for empty-with-prose) or convert tominor. The storyboard and state-machine edits are orthogonal compliance-fixture work and don't change that calculus. - Idempotency-equality fragility at
server/src/training-agent/account-handlers.ts:511-513.JSON.stringify(accountStateToWire(...))is order-dependent and silently breaks ifaccountStateToWire's key emission order changes or if a new conditional field gets added. Swap for aaccountStateEquals(a, b)helper that compares semantic fields explicitly. Same gotcha applies to cross-sessionfindAccountByIdAcrossSessionsmatches — when we early-return withoutaccounts.set(key, state), the current session never gets a local copy. Fine today becausehandleListAccountsreads viaaccountsForPrincipal, but a future caller usinggetAccountMapdirectly would miss it. - 3.0-compat filter chain bypass at
server/src/training-agent/account-handlers.ts:1140-1150. WhenpreferFixtureAccounts === true,req.sandbox/req.status/exactAccountFilterare skipped — mirrors prior behavior, but worth a one-line comment so a future reader doesn't "fix" it.
Minor nits (non-blocking)
- Double-cast on
brandinseedAccountFixture.server/src/training-agent/account-handlers.ts:497re-castsbrandto{ domain: string; brand_id?: string; name?: string }even thoughbrand?.domainwas narrowed truthy above. A typed local would drop the cast. - The fixture-name domains (
pagination-acme-1.example, etc.) drift from the test-kit's ownacme-outdoor.examplebrand. Not wrong — the storyboard just wants three distinct sandbox accounts — but the prefixpagination-makes it harder to grep the storyboard back to itstest-kits/acme-outdoor.yamlkit. Non-blocking.
Approving on the strength of the schema-pattern match against existing seed_* scenarios plus the round-trip test covering both 3.0 and 3.1 compat modes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates compliance snapshots and storyboards for BidCliq's 3.0/3.1 runs: refreshes invalid_transitions, makes state_machine create active buys from discovered products, and removes the hardcoded test-product path. Adds seed_account support for deterministic list_accounts pagination and wires the controller schema, advertised scenarios, and lint docs accordingly. Includes an empty changeset because the repo pre-push hook requires one. Validated with targeted storyboard/schema tests, build:compliance, build:schemas, precommit, and the pre-push storyboard matrices for current source and 3.0 compatibility.