Skip to content

feat(switchback): serve R33 cluster-defined switchbacks - #15

Merged
joalves merged 80 commits into
mainfrom
feat/switchback-phase1b
Nov 17, 2026
Merged

joalves merged 80 commits into
mainfrom
feat/switchback-phase1b

Conversation

@marcio-absmartly

@marcio-absmartly marcio-absmartly commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Switchbacks on the Java SDK, reworked to the R33 cluster-defined contract that the Collector serves (absmartly/abs#5801, open). The earlier Phase 1E hashed-bucket design on this branch is gone: no SwitchbackBuckets, no switchbackClusterUnitType / switchbackClusterCount / switchbackClusterAttribute.

Jira: FT-2399. Platform counterpart: abs#5801 (serving), abs#5723 (API contract), abs#5759 (goal copy_index).

Wire model (json/Experiment)

Nullable, omitted on unit experiments:

  • randomizationType — "switchback" or absent.
  • switchbackClusters: Map<String,String> — unit-type name → attribute path, in declared order (unit_type_id ascending). Order is semantic; the deserializer preserves it and equals is order-sensitive.
  • switchbackClusterValues: String[] — allow-list; null or [] = every value. The Collector serves an experiment that has no allow-list rows with this field absent.
  • switchbackStartAt (hour-aligned epoch ms), switchbackPeriodMs, switchbackCarryoverDurationMs, switchbackBurnInDurationMs, switchbackBurnOutDurationMs, switchbackDesignType, switchbackEstimand.

Unknown legacy fields are ignored.

Serving (port of Collector ContextAPI.switchbackServing / switchbackVariant / assignExperiment)

  • Sources are iterated in declared order; the first unit with a readable value serves and its value is the cluster key. A later unit with a different value ⇒ disagreement ⇒ ineligible. Units without a value are skipped.
  • Value normalisation = Collector SwitchbackClusterKeys.normalize: non-empty string as-is; integer types → base-10 text; null/boolean/float/object/array → no value.
  • Ineligible (no value, disagreement, filtered out, no linked unit) ⇒ variant 0, eligible=false, no exposure.
  • periodIndex = floorDiv(now − startAt, periodMs); variant = SwitchbackAssigner.assignSwitchback(clusterKey, periodIndex, seed, arms) on the raw key. Golden vectors byte-identical to abs lib/utils/.../golden-vectors.json (blob b314abeb9e97).
  • Precedence: override → assignment rules → audience (strict) → full-on → traffic (serving-unit hash) → schedule draw. Holdouts never apply.
  • Unservable (unaligned or out-of-range anchor, bad period, <2 arms, malformed path, missing/empty cluster map) ⇒ ineligible control; never a fallback to unit assignment.
  • Exposure is recorded under the exact serving unit, one per (experiment, period), clock-stamped. Publish payload is byte-for-byte unchanged; timestamped attributes keep being published so the Collector can re-resolve the cluster at exposedAt.
  • Documented SDK choice: no exposure before the anchor (there is no period to attribute to). A strict audience mismatch is the exception: the audience check comes first, so it is recorded before the anchor too, as in the Collector.
  • A strict audience mismatch publishes assigned=false, as a unit experiment does. Through a variable key, such a switchback gives way to the next experiment that declares the key.

Tests

  • ContextSwitchbackClusterRuleTest ports the Collector's ContextAPISwitchbackTest.ClusterRule cases 1:1 by name, plus a parity grid against a port of the Collector's SdkSwitchbackRule oracle (2 anchors × 3 periods × 6 uids × 4 keys × 7 instants × 4 cluster axes).
  • attribute-path-cases.json byte-identical to abs collector/src/test/resources/switchback/ (blob 7b1d3fed5985).
  • 731 tests in core-api (main's 586 plus the switchback suites; no test id from either side lost in the merge) and 732 in the generated core-api-java6, both also on the JDK 25 runtime. Mutation checks (each restored, each fails its named test): last-unit-serves, hashed key, disagreement-first-wins, holdouts applied, allow-list dropped, rules dropped, unaligned anchor served, traffic-miss exposure suppressed, legacy identity clause, rule early-return, pre-period after traffic, units-outer iteration, recheck skip, strict-mismatch fall-through, period check before audience, assigned=true on strict mismatch, traffic check skipped, a forced variant (custom, full-on, override) replaced by the schedule draw, audience evaluated before the unservable check.
  • Review loop: performance + code-quality + test-quality, four rounds, simplifier pass. The last two rounds (the second of them on the head with main merged in) found no defect in main sources; their test and documentation follow-ups are in. The "Exposure flags" table in SWITCHBACK.md is asserted row by row, variant included, on a unit experiment and on a switchback. Spotless (Java target), animalsniffer (Java 1.6) and javadoc green.

Known gap

One mutation survives the suite, and survived it before this round too: making sameSwitchbackIdentity ignore switchbackPeriodMs. A period-length change is still caught by the per-assignment snapshot check (switchbackConfigMatches), so no test fails when only the generation check is weakened. This is the overlap behind Q1 (generations versus snapshots); no test was added while that question is open.

Base

Main 818d82d665 (1.8.0: java.util.concurrent in core-api, generated core-api-java6, JDK 25 test task) is merged in. There was no textual conflict; the switchback tests' CompletableFuture import moved to java.util.concurrent. The switchback code creates no futures and needed no change, and it compiles and passes unchanged in core-api-java6.

Merge order

Merge after abs#5801 (and #5723/#5759) are on main; cross-sdk-tests#13 will pin its java lane to this branch until then.

Summary by CodeRabbit

  • New Features
    • Added support for switchback experiments, assigning variants by cluster and time period.
    • Switchback assignments account for cluster eligibility, traffic, audience checks and assignment rules. Holdouts do not apply.
    • Exposure events use the timestamp associated with the resolved period.
  • Documentation
    • Added guidance on switchback configuration, cluster selection, scheduling, exposure recording and SDK compatibility.

…Data

Adds randomizationType, switchbackClusterUnitType, switchbackStartAt,
switchbackPeriodMs, carryover/burn-in/burn-out durations, design type and
estimand to json.Experiment, including equals/hashCode/toString. Absent
fields stay null; unknown fields are still ignored.
…ctors

Java 1.6 port of the platform's SwitchbackAssignment using the SDK's own
Murmur3_32 and little-endian Buffers (le64 seed then le32 key hash).
The platform golden-vector fixture is copied verbatim; every
assignSwitchback (882) and fisherYatesPermutation (504) case is asserted,
parsing 64-bit fields from decimal strings.
For randomizationType=switchback the variant draw becomes
SwitchbackAssigner.assign(hashUnit(uid), periodIndex, seed, arms) with
periodIndex = floorDiv(now - ceilHour(switchbackStartAt), periodMs), read
once from the injected Clock. Assignments are cached under
name + U+001F + periodIndex, so each period gets a fresh exposure state:
one exposure per experiment/cluster/period, rollover on the boundary.

Precedence is unchanged (override, holdouts, audience, full-on, custom,
traffic, variant); traffic eligibility keeps the per-unit traffic hash.
Before the anchor, with a null start/period, or with a cluster unit type
different from the unit type, the experiment is ineligible; a missing
unit stays unassigned. There is no unit-assignment fallback.

Grid fields (type, cluster unit type, start, period, design) join the
cache-validity check so a refresh that changes them re-resolves; burn,
carryover and estimand do not. Per-period entries are bounded to the two
most recent periods per experiment. Exposure payloads are unchanged.
Hashed cluster identity, 2/3/10-arm schedules against the platform's
Python reference, 1h/24h edges, pre-anchor and null-start ineligibility,
same-period cache and rollover exposures, variables, missing unit,
full-on, override/custom, sticky traffic, refresh invalidation, holdouts,
bounded cache, and the byte-exact publish payload.
A switchback assignment's period is selected from one clock reading, but
enqueueExposure read the clock again, so a call crossing a period boundary
published the previous period's variant with an exposedAt in the next
period. The decision instant now flows from getTreatment/getVariableValue
through getAssignment and settleExposure to the exposure. Each exposing call
uses its own instant, so an exposure after a peek is not pinned to the peek.
Unit experiments and holdout exposures keep the enqueue-time reading.
Retention compared period indices across grids and always evicted the
lowest, so a refresh that lowered the current index evicted the entry just
installed and every call re-exposed. Retention is now held per experiment
under its switchback identity (id, iteration, cluster unit type, start,
period length, design). An identity change drops that experiment's previous
period slots together, and eviction removes the lowest index other than the
one just resolved. A rewound clock re-exposes an evicted period once, not
once per call.
…nments

The override fast path checked only the forced variant and holdout set and
the override branch never pinned the grid, so an overridden switchback slot
survived a grid change and kept the previous definition's variable values.
Override assignments now pin the switchback identity and revalidate it like
ordinary ones. Override precedence and holdout firing are unchanged.
Bare-name and period slots were managed independently, so after
switchback -> unit -> identical switchback (or removal and restore) the old
period slot matched the restored definition again and was returned with its
exposed state. All of an experiment's switchback slots now share one epoch
keyed by its switchback identity. setData drops every slot of an epoch the
installed definition no longer matches, under the context write lock, so an
identity transition is atomic for resolvers and a return to an identical
definition re-resolves.
Document that exposure dedup is guaranteed only within the two retained
periods, what a re-entered period costs, which identity changes start a new
epoch, and that switchback exposures are stamped with the resolution
instant. Correct the precedence order (traffic gates custom assignment).
Stop claiming the Collector already serves switchback fields or that the
reconciliation query itself flags schedule mismatches.
…ock_ only

Installing data under contextLock_ write deadlocked a refresh started from
audience evaluation, which already runs under contextLock_: a completed
provider future ran setData inline and attempted a read-to-write upgrade,
and an async provider's completion thread waited on the lock held by the
matcher that waited on it. This affected unit-only contexts too.

setData is back to dataLock_ write only. While installing the index it
compares each experiment's switchback identity (randomization type, id,
iteration, cluster unit type, startAt, periodMs, design) with the previous
index and either carries the switchback generation over or assigns a fresh
one. A SwitchbackEpoch records the generation it was created under;
resolution drops the whole epoch (period and bare-name slots, overrides
included) when the installed definition is absent, not switchback, or of a
different generation. Every transition, including an unobserved unit or
removed state, yields a new generation, so a stale slot is never
resurrected.
Two readers revalidating the same cached period slot are held at a barrier
inside audience evaluation, so both reject the slot under contextLock_ read
before either installs a replacement. Exactly one exposure must result; with
the write-lock recheck disabled the test produces two.
…ention

A re-created evicted period has the same variant only while seed, split and
custom assignment are unchanged; re-entry dedup is bounded-cache best effort.
Retention keeps at most two period indices and evicts the lowest other than
the one just installed. Epoch invalidation is described as generation-based.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

This change adds switchback configuration and deterministic cluster-by-period assignment. Context resolves serving units and cluster values, applies assignment precedence, caches assignments by period, and records exposure timestamps from resolution. The change also adds tests for configuration, serving, schedules, cache behaviour and exposure handling, plus switchback documentation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • absmartly/java-sdk#11: Adds audience matching behaviour used when switchback assignment evaluates audiences.
  • absmartly/java-sdk#12: Adds holdout assignment and suppression that switchback assignment explicitly excludes.
  • absmartly/java-sdk#17: Adds assignment-rule evaluation used before switchback schedule selection.
Merge Risk: Minimal · up to 16e95

The change moves switchback serving to the R33 cluster-defined contract. No outstanding defects were identified in this review. The mid-period attribute behavior is documented as intended.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly identifies the main change: serving R33 cluster-defined switchback experiments.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the cluster keys,
Then hops through periods with ease.
A shuffled schedule picks the part,
An exposure marks its start.
Two cached slots rest in the burrow,
While rules guide each switchback tomorrow.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 9a10b640-83ab-4737-9908-9a051fcf1055
Commits

Reviewing files that changed from the base of the PR and between 91b9b31 and 16e95b7.

Files selected for processing: 1

  • SWITCHBACK.md
Files skipped from review as they are similar to previous changes: 1

  • SWITCHBACK.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@jervasion-absmartly

jervasion-absmartly commented Oct 12, 2026 •

Copy link
Copy Markdown

Review submitted

The automated review has been submitted. See the review for the verdict and any findings.

Head: 8fd4d4dfc6cb | Updated: 2026-11-16 17:56 UTC

@jervasion-absmartly jervasion-absmartly 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.

APPROVED WITH COMMENTS - The switchback serving change passes behavioral and compatibility checks; no merge blocker survives.

Reviewed head 24af47f747d762333458ee3e9b5548d27a458f49 against base/merge-base 34716f86fe6a0a3de8ca5c6c53562fa9400d45f6.

Scope and result

The change adds nullable experiment metadata, the balanced-block schedule, period-scoped treatment/variable assignments and exposures, and refresh-generation invalidation. I traced the public lookup methods through cache resolution, holdouts, overrides, timestamp selection and publishing. The actual affected surfaces match the declared SDK scope. No verified functional defect or measured blocker was established.

Rollout remains separate from merging this SDK change: the Collector must emit the fields, and all serving SDKs must be upgraded before enabling switchbacks. The linked Collector PR explicitly keeps creation beta-gated until serving clients are ready. The documented two-period deduplication bound and lazy retention of removed experiments are intentional limitations, not newly inferred guarantees. No deployed/customer adoption claim is needed for this verdict.

Validation

  • On verified JDK 11: ./gradlew :core-api:test :core-api:animalsnifferMain :core-api:jacocoTestCoverageVerification :core-api:jar --no-daemon passed: 463 tests, Java 6 API compatibility, coverage gates and JAR packaging.
  • Executed scenarios include 1h/24h boundaries, pre-anchor/null-start behavior, 2/3/10-arm schedules, hashed cluster identity, treatment and variable rollover, exposure deduplication across flushes, resolution-time timestamps, holdout suppression, overrides/custom assignments, sticky traffic, refresh/type/removal transitions, bounded cache/rewind behavior, concurrent same-period resolution and inline/async audience-refresh deadlock regressions.
  • All 882 assignment and 504 permutation golden vectors passed, including signed 64-bit boundaries.
  • git diff --check passed. The introduced-blob helper completed successfully; all 30 content writes across the 15 PR commits were audited, including superseded content.
  • Exact-head Java-SDK CI build completed successfully with ./gradlew clean build; the build job and its steps passed. Exact-head CodeRabbit commit status is also successful.
  • Local clean build could not initialize the Groovy formatter because download.eclipse.org failed DNS resolution. Formatter/full-build evidence therefore comes from the passing exact-head CI, not a claimed local pass. No production deployment or cross-SDK end-to-end rollout was performed.

Passes (non-blocking)

Run: core runtime/API/error/concurrency/performance; tests/CI/packaging; behavior-bearing data (wire fixture and golden vectors); cross-cutting simplicity (independent passes); comment hygiene and diff composition (primary audit). Not run: deployment/operations/observability (no deployment, operational configuration, metric/log/trace emission changed); shared frontend blast radius (no frontend source changed).

Comment hygiene (non-blocking)

113 comment / 1515 code added lines, ratio ~1:13.4; 8 blocks flagged.
threshold T=16; restatements counted: no (10 × C < E)
The following short blocks restate adjacent code and could be removed locally; none qualify for promotion:

  • Context.java:653: retry reads a fresh clock.
  • Context.java:1054: absent/unit experiments return the sentinel.
  • Context.java:1062: the sentinel uses the bare cache name.
  • Context.java:1235: assignment fields are compared by the named helper.
  • Context.java:1338: stale epochs take the write path.
  • ContextSwitchbackTest.java:66: describes nextRead control flow.
  • ContextSwitchbackTest.java:885: narrates the unchanged-identity assertion.
  • ContextSwitchbackTest.java:891: describes the refreshing matcher’s callback.
    Protocol parity, timing/concurrency rationale, external analysis constraints and fixture provenance comments were preserved.

Diff composition (non-blocking)

Every file is required for the change; none flagged. No scratch reports, generated build output or credential-bearing content was identified in the cumulative diff or introduced content writes.

Simplifications (non-blocking)

2 candidates; neither has a demonstrated, tested saving and neither affects this approval:

  • Context.java:997–1019,1235–1240: assignment grid snapshots overlap refresh-generation identity. A smaller alternative would retain the switchback boolean/type check and rely on epoch invalidation instead of the four copied grid fields and pinning helper. Do not apply blindly: equivalence requires immutable installed definitions; arbitrary mutation through returned data is a counterexample. LOC delta: not measured; no scratch equivalence claim.
  • Context.java:1076–1081: the sole caller already guarantees the second definition is switchback. The helper could reject only an absent/non-switchback predecessor and then compare identity fields, removing the unreachable two-non-switchback branch. LOC delta: not measured; below any demonstrated blocking threshold.

Run a simplification pass locally before pushing: these candidates cost less to address now than as a further review round.

@marcio-absmartly

Copy link
Copy Markdown
Contributor Author

On hold — do not merge. Product decision (Márcio, 2026-10-22): switchbacks move to hashed cluster buckets (10/50/100/1000 over the unit or a unit attribute, spec Revision 3.2 / Phase 1E). This PR implements per-value clustering, so it stays open and Phase 1E lands on this branch before the first switchback-capable release. The current approval covers the per-value version only.

…esolution

Port of lib:utils SwitchbackBuckets (MD5 bucket, attribute normalisation) and the
Collector's SwitchbackAttributePath, Java 1.6 compatible. Copies the platform's
bucket-golden-vectors.json and attribute-path-cases.json byte-identical and
reproduces all 702 bucket vectors, the unit-key and attribute-key vectors and
every path case.
…tribute

Both are optional; an absent field deserialises to null, so unit experiments
and older payloads are unchanged.
The schedule is drawn for bucketOf(seed, key, switchbackClusterCount) instead of
the per-value cluster. The key is the published unit hash, or the context
attribute at switchbackClusterAttribute resolved by the Collector's path rules
and normalised like the Collector (latest setAt at or before the call wins).

A disallowed or missing count or an unsupported path makes the grid
unevaluable (variant 0, not eligible), as the Collector's unservable rules do; a
unit without a key is ineligible. The key is read once per period slot, so a
setAttribute mid-period never moves a unit to another bucket (R32-3). Count and
attribute join the switchback identity, so changing them starts a new epoch.
Serves contexts through Context and compares every exposure with the
Collector's ContextAPI.switchbackVariant, taking the expected bucket from
bucket-golden-vectors.json and path outcomes from attribute-path-cases.json:
unit and attribute sources, top-level, nested and array paths, ineligible
values, disallowed counts and all three allowed counts.
With a null switchbackClusterUnitType the experiment's unitType alone chooses the
hashed unit, but it was not part of the switchback identity, so a replacement slot
inherited the previous unit type's cluster key.
… unservable schedule

The audience check comes before the period check, matching the
Collector, whose strict branch returns before the switchback variant is
consulted. Both cases record one exposure: variant 0, assigned=false,
eligible=true, audienceMismatch=true. SWITCHBACK.md says so next to the
statement that pre-start exposures are silent.
…ariable key

A strict-mismatched switchback is not assigned, so through
getVariableValue/peekVariableValue it gives way to the next experiment
that declares the key, as a unit experiment does; alone on the key it
returns the default value and records nothing. SWITCHBACK.md scopes
"exactly one exposure" to getTreatment and describes the variable-key
behaviour.
…on assigned

sbcWith read !assigned && !ruleOverride as "the Collector lists no
assignment", which a strict audience mismatch now also satisfies. The
package-private SwitchbackResolution test seam gains applies (serving
status is not ABSENT), and sbcWith uses it.
…es it now

The Collector reads the allow-list from one row per value. An experiment with no
rows is served with switchbackClusterValues absent. The earlier wording cited an
array column and line numbers that no longer exist.
…e switchback tests

core-api no longer depends on the streamsupport backport since main's
55c040a. Port the switchback tests the way that commit ported main's
own tests: import java.util.concurrent.CompletableFuture one by one, so
core-api-java6 can switch it back to java8.util when generating its
sources.
…k tests

spotlessJavaCheck wants the java.util.concurrent imports in order after
the port to java.util.concurrent.CompletableFuture.
@marcio-absmartly

Copy link
Copy Markdown
Contributor Author

Q1: Keep the current implementation; simplify separately.

This PR does not decide the mutation contract. The snapshot check follows the pattern the unit path already had before this PR: experimentMatches compares the cached assignment's own copies of id, unitType, iteration, fullOnVariant and trafficSplit with the live definition, and getData() returns the installed ContextData object itself, not a copy. switchbackConfigMatches does the same for the five fields that define the period grid and the cluster key. Dropping the snapshots for switchbacks alone would make the two paths behave differently if a caller mutates a definition in place, so it belongs with a decision about that contract for both paths, in its own change.

The second candidate (sameSwitchbackIdentity handling a non-switchback predecessor) and the comment trims are optional and behaviour-neutral; they go into the simplifier pass that follows the merge below.

Head status. The head moved to 2470d444bf after this review: nine test and documentation commits from an independent review of 9a1978bc..d5b1a6e5 (no behaviour change in main sources; 723 tests) and one comment correction. CI is red on it, and not because of those commits: main gained #20 (java.util.concurrent in core-api, generated core-api-java6) at 19:07 UTC today, and the PR's merge with main no longer compiles (package java8.util.concurrent does not exist in the switchback tests). A merge of main 818d82d665 with the port to the new types is in progress on a side branch and will be pushed here once its gates pass.

@jervasion-absmartly jervasion-absmartly 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.

⚠️ Could not finish verification

The latest main integration fixes the switchback test-compilation failure, and both SDK artifacts now pass on JDK 11 and JDK 25. No verified code blocker survives. Approval remains withheld only because the PR explicitly requires abs#5801 and abs#5759 to merge first; both are still open.

Next step: Complete the stated platform merge prerequisites, then request the final merge-readiness check. Q1 is answered; no SDK change is requested by this review.

Suggestions

  • The previously listed optional simplifications and short comment cleanups remain non-blocking; see details.

What I checked

  • ✅ 2,918 test executions passed, with zero failures/errors/skips: core-api has 729 tests and core-api-java6 has 730, each run on JDK 11 and JDK 25.
  • ✅ Both artifacts pass compatibility checks, coverage gates, JAR packaging and Javadoc.
  • ✅ Exact-head Java-SDK CI build passed, including the full clean build. The failure at the earlier head is fixed, not carried forward.
  • ✅ Strengthened tests pin strict-audience precedence, variable-key fallback, variants as well as exposure flags, and actual traffic misses.
  • ⚠️ The declared platform merge order remains incomplete; no coordinated Collector/warehouse/cross-SDK end-to-end run is claimed.
Review details

Scope and answer reassessment

Review round 7. Initially dispatched head 2470d444bf1d8c06b58380fff7a87dfc24f35855 against ed74110fad5c8a3597827b0b25097b7e27f01a07. During verification the PR moved. Final reviewed head is a05a8f97648dd0f803fa8ac8f1611b94e9536de7, current base and verified merge-base 818d82d665c3a72af4c9fc49af5839e504070494. Reviewed the intervening ten test/documentation commits, main merge f7f06ad (empty remerge diff), and explicit/sorted native CompletableFuture imports in four switchback test files. Rechecked the cumulative 22-file PR inventory and merged runtime intersections. Main's unrelated accepted changes are not attributed to this PR. No applicable AGENTS.md/CLAUDE.md found; current CONTRIBUTING, module generation/build rules, workflow and switchback contract read.

Intent remains R33 ordered cluster-source/raw-key switchback serving, period-specific caching and exposure timing, without holdout application. Latest changes strengthen tests without changing serving behavior; the applies field is an observational test seam derived from serving status. Main introduces native future/function types in core-api and generated backports in core-api-java6; this PR now imports the supported types explicitly so both variants build.

Q1 answered by Márcio: retain current snapshots; decide mutation semantics and simplify separately. Verified that getData returns installed data and the pre-existing unit path also compares assignment snapshots with live definitions. Arrays/maps are references, not deep copies; no broader immutability or mutation guarantee is inferred. This is sufficient to close the optional question without deleting checks or requiring a contract decision here. No unanswered author questions remain. The earlier explicit acceptance of pinned-cluster/exposure-time-attribute contamination still applies and was not reopened.

Verified facts: passing current-head matrix and compatibility gates, fixed imports, unchanged switchback helper implementations, and open platform prerequisites. High-confidence inference: foundational pre-release integration, based on contract history and explicit merge ordering; no customer-adoption assertion is needed. abs#5723 is already merged; abs#5801 and abs#5759 were re-read and remain open. No material unknown is being substituted for a defect.

Convergence summary — review round 7

  • Unresolved original blockers: 0
  • Remediation regressions: 0
  • Independent PR-change findings: 0
  • Acceptance criteria still open: none for a verified finding; platform merge prerequisites remain outstanding.
  • Human adjudication requested: no — Q1 is answered and the earlier attribution decision is explicit.

Validation

JDK 11.0.32.1 verified for Gradle/compilation; registered JDK 25 used by testJdk25.

Executed on final head with JAVA_HOME="${JAVA_HOME_11:?}" ./gradlew :core-api:test :core-api-java6:test :core-api:testJdk25 :core-api-java6:testJdk25 :core-api:animalsnifferMain :core-api-java6:animalsnifferMain :core-api:jacocoTestCoverageVerification :core-api-java6:jacocoTestCoverageVerification :core-api:jar :core-api-java6:jar :core-api:javadoc :core-api-java6:javadoc --no-daemon: passed, 22 tasks executed. XML: 729/729 core-api and 730/730 core-api-java6 on JDK 11/25, no failures/errors/skips. Generated switchback sources/tests execute in the backport artifact as well.

Exact-head Java-SDK run 43117292922, build job 130848442218: completed/success. Workflow runs the full clean build with JDK 25 toolchain. Commit-status list is empty, not a pending posted status. Local formatter initialization remains unavailable because download.eclipse.org fails DNS; successful exact-head full CI supplies that gate.

Earlier dispatched head 2470d44 passed 723 tests locally, but its temporary merge with main failed compileTestJava with 27 errors from four java8.util.concurrent imports. This was independently reproduced, then verified fixed in the pushed final head; it is not a surviving finding. Old CI run 43114423803 is red and is not used as evidence for current head. Its downloadable logs were inaccessible, so root cause was established through the local merge reproduction and code.

git diff --check 818d82d HEAD passed. Golden/path/wire suites run in the matrix. Independent test review found meaningful branch-specific assertions, no demonstrated vacuity. No test mutation certification is claimed.

Passes (non-blocking)

Run: core runtime/API/concurrency/data/performance intersection reassessment (main merged into Context; production helpers otherwise unchanged); independent tests/CI/packaging (strengthened tests and two generated/native artifacts); dedicated error specialist follow-up (merged futures/executor interactions with resolution, exposure, retries, publish recovery and refresh; completed with no verified candidate); behavior-bearing fixtures (unchanged fixtures executed); operations/observability (prior warning review retained, merge guidance rechecked); primary cross-cutting simplicity, comment hygiene and diff composition. Prior full-scope runtime and specialist evidence from round 6 is retained only for unchanged behavior.

Not run: frontend/shared-component blast radius (no frontend source); deployment-manifest execution (none changed). No selected specialist gap remains.

Comment hygiene (non-blocking)

468 comment/documentation-content / 4247 code added lines; ratio ~1:9.1.

threshold T=43; restatements counted: yes (10 × C ≥ E)

The short harmless blocks declined in round 6 remain non-blocking. Locations below are relative to core-api/src; line shifts accounted for:

  • main/java/com/absmartly/sdk/Context.java:747,1244,1553,1761,1818 — retry clock, bare key, snapshot helper, silent flag, stale-slot write path; reason: restates code.
  • main/java/com/absmartly/sdk/internal/SwitchbackAttributePath.java:28,79 — parallel indices and primitive fast path; reason: restates code.
  • main/java/com/absmartly/sdk/json/Experiment.java:139,152 — ordered hashing/equality; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterRuleTest.java:54,134,262,284,357,494 — fixture/setup and tuple layout; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterTest.java:263 — control config; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackTest.java:54,344,1021,1358,1364,1401 — setup, cache bound, epoch/evaluation counter; reason: restates code.
  • test/java/com/absmartly/sdk/SwitchbackTestSupport.java:17,46,55 — clock/map helpers; reason: restates code.
  • test/java/com/absmartly/sdk/internal/SwitchbackAttributePathTest.java:117 — depth-bound setup; reason: restates code.

Additional history paragraph Context.java:1805–1809 describes the pre-recheck behavior (five content lines); reason: narrates history. It also records the A-B-A concurrency rationale. Promotion declined: this single short accurate paragraph explains the otherwise surprising rejected-object branch and does not warrant blocking. New protocol/audience/traffic comments explain external constraints or deliberately discriminating fixtures and are preserved. No promoted finding.

Diff composition (non-blocking)

Every file is required for the change; none flagged. Pinned introduced_blobs.py completed successfully over current merge-base..head: 164 content writes, including superseded content and merge resolutions. Rechecked new destinations/content and credential patterns; no artifact or credential finding. Previously inspected README API-key examples are placeholders.

Simplifications (non-blocking)

Two prior candidates retained, no new candidate in the follow-up delta:

  • Context switchback snapshots overlapping generations: smaller alternative would rely on generation identity, but Q1 deliberately defers the mutation-contract decision; not shown equivalent and not requested in this PR. LOC delta: not measured.
  • sameSwitchbackIdentity's second argument is already a non-null switchback at its sole caller; smaller alternative removes unused both-non-switchback handling and checks only predecessor before comparing fields. Optional owner-acknowledged cleanup. LOC delta: not measured.

Run a simplification pass locally before pushing: these candidates cost less to address now than as a further review round.

@jervasion-absmartly jervasion-absmartly 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.

⚠️ Could not finish verification

The latest main integration fixes the switchback test-compilation failure, and both SDK artifacts now pass on JDK 11 and JDK 25. No verified code blocker survives. Approval remains withheld only because the PR explicitly requires abs#5801 and abs#5759 to merge first; both are still open.

Next step: Complete the stated platform merge prerequisites, then request the final merge-readiness check. Q1 is answered; no SDK change is requested by this review.

Suggestions

  • The previously listed optional simplifications and short comment cleanups remain non-blocking; see details.

What I checked

  • ✅ 2,918 test executions passed, with zero failures/errors/skips: core-api has 729 tests and core-api-java6 has 730, each run on JDK 11 and JDK 25.
  • ✅ Both artifacts pass compatibility checks, coverage gates, JAR packaging and Javadoc.
  • ✅ Exact-head Java-SDK CI build passed, including the full clean build. The failure at the earlier head is fixed, not carried forward.
  • ✅ Strengthened tests pin strict-audience precedence, variable-key fallback, variants as well as exposure flags, and actual traffic misses.
  • ⚠️ The declared platform merge order remains incomplete; no coordinated Collector/warehouse/cross-SDK end-to-end run is claimed.
Review details

Scope and answer reassessment

Review round 7. Initially dispatched head 2470d444bf1d8c06b58380fff7a87dfc24f35855 against ed74110fad5c8a3597827b0b25097b7e27f01a07. During verification the PR moved. Final reviewed head is a05a8f97648dd0f803fa8ac8f1611b94e9536de7, current base and verified merge-base 818d82d665c3a72af4c9fc49af5839e504070494. Reviewed the intervening ten test/documentation commits, main merge f7f06ad (empty remerge diff), and explicit/sorted native CompletableFuture imports in four switchback test files. Rechecked the cumulative 22-file PR inventory and merged runtime intersections. Main's unrelated accepted changes are not attributed to this PR. No applicable AGENTS.md/CLAUDE.md found; current CONTRIBUTING, module generation/build rules, workflow and switchback contract read.

Intent remains R33 ordered cluster-source/raw-key switchback serving, period-specific caching and exposure timing, without holdout application. Latest changes strengthen tests without changing serving behavior; the applies field is an observational test seam derived from serving status. Main introduces native future/function types in core-api and generated backports in core-api-java6; this PR now imports the supported types explicitly so both variants build.

Q1 answered by Márcio: retain current snapshots; decide mutation semantics and simplify separately. Verified that getData returns installed data and the pre-existing unit path also compares assignment snapshots with live definitions. Arrays/maps are references, not deep copies; no broader immutability or mutation guarantee is inferred. This is sufficient to close the optional question without deleting checks or requiring a contract decision here. No unanswered author questions remain. The earlier explicit acceptance of pinned-cluster/exposure-time-attribute contamination still applies and was not reopened.

Verified facts: passing current-head matrix and compatibility gates, fixed imports, unchanged switchback helper implementations, and open platform prerequisites. High-confidence inference: foundational pre-release integration, based on contract history and explicit merge ordering; no customer-adoption assertion is needed. abs#5723 is already merged; abs#5801 and abs#5759 were re-read and remain open. No material unknown is being substituted for a defect.

Convergence summary — review round 7

  • Unresolved original blockers: 0
  • Remediation regressions: 0
  • Independent PR-change findings: 0
  • Acceptance criteria still open: none for a verified finding; platform merge prerequisites remain outstanding.
  • Human adjudication requested: no — Q1 is answered and the earlier attribution decision is explicit.

Validation

JDK 11.0.32.1 verified for Gradle/compilation; registered JDK 25 used by testJdk25.

Executed on final head with JAVA_HOME="${JAVA_HOME_11:?}" ./gradlew :core-api:test :core-api-java6:test :core-api:testJdk25 :core-api-java6:testJdk25 :core-api:animalsnifferMain :core-api-java6:animalsnifferMain :core-api:jacocoTestCoverageVerification :core-api-java6:jacocoTestCoverageVerification :core-api:jar :core-api-java6:jar :core-api:javadoc :core-api-java6:javadoc --no-daemon: passed, 22 tasks executed. XML: 729/729 core-api and 730/730 core-api-java6 on JDK 11/25, no failures/errors/skips. Generated switchback sources/tests execute in the backport artifact as well.

Exact-head Java-SDK run 43117292922, build job 130848442218: completed/success. Workflow runs the full clean build with JDK 25 toolchain. Commit-status list is empty, not a pending posted status. Local formatter initialization remains unavailable because download.eclipse.org fails DNS; successful exact-head full CI supplies that gate.

Earlier dispatched head 2470d44 passed 723 tests locally, but its temporary merge with main failed compileTestJava with 27 errors from four java8.util.concurrent imports. This was independently reproduced, then verified fixed in the pushed final head; it is not a surviving finding. Old CI run 43114423803 is red and is not used as evidence for current head. Its downloadable logs were inaccessible, so root cause was established through the local merge reproduction and code.

git diff --check 818d82d HEAD passed. Golden/path/wire suites run in the matrix. Independent test review found meaningful branch-specific assertions, no demonstrated vacuity. No test mutation certification is claimed.

Passes (non-blocking)

Run: core runtime/API/concurrency/data/performance intersection reassessment (main merged into Context; production helpers otherwise unchanged); independent tests/CI/packaging (strengthened tests and two generated/native artifacts); dedicated error specialist follow-up (merged futures/executor interactions with resolution, exposure, retries, publish recovery and refresh; completed with no verified candidate); behavior-bearing fixtures (unchanged fixtures executed); operations/observability (prior warning review retained, merge guidance rechecked); primary cross-cutting simplicity, comment hygiene and diff composition. Prior full-scope runtime and specialist evidence from round 6 is retained only for unchanged behavior.

Not run: frontend/shared-component blast radius (no frontend source); deployment-manifest execution (none changed). No selected specialist gap remains.

Comment hygiene (non-blocking)

468 comment/documentation-content / 4247 code added lines; ratio ~1:9.1.

threshold T=43; restatements counted: yes (10 × C ≥ E)

The short harmless blocks declined in round 6 remain non-blocking. Locations below are relative to core-api/src; line shifts accounted for:

  • main/java/com/absmartly/sdk/Context.java:747,1244,1553,1761,1818 — retry clock, bare key, snapshot helper, silent flag, stale-slot write path; reason: restates code.
  • main/java/com/absmartly/sdk/internal/SwitchbackAttributePath.java:28,79 — parallel indices and primitive fast path; reason: restates code.
  • main/java/com/absmartly/sdk/json/Experiment.java:139,152 — ordered hashing/equality; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterRuleTest.java:54,134,262,284,357,494 — fixture/setup and tuple layout; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterTest.java:263 — control config; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackTest.java:54,344,1021,1358,1364,1401 — setup, cache bound, epoch/evaluation counter; reason: restates code.
  • test/java/com/absmartly/sdk/SwitchbackTestSupport.java:17,46,55 — clock/map helpers; reason: restates code.
  • test/java/com/absmartly/sdk/internal/SwitchbackAttributePathTest.java:117 — depth-bound setup; reason: restates code.

Additional history paragraph Context.java:1805–1809 describes the pre-recheck behavior (five content lines); reason: narrates history. It also records the A-B-A concurrency rationale. Promotion declined: this single short accurate paragraph explains the otherwise surprising rejected-object branch and does not warrant blocking. New protocol/audience/traffic comments explain external constraints or deliberately discriminating fixtures and are preserved. No promoted finding.

Diff composition (non-blocking)

Every file is required for the change; none flagged. Pinned introduced_blobs.py completed successfully over current merge-base..head: 164 content writes, including superseded content and merge resolutions. Rechecked new destinations/content and credential patterns; no artifact or credential finding. Previously inspected README API-key examples are placeholders.

Simplifications (non-blocking)

Two prior candidates retained, no new candidate in the follow-up delta:

  • Context switchback snapshots overlapping generations: smaller alternative would rely on generation identity, but Q1 deliberately defers the mutation-contract decision; not shown equivalent and not requested in this PR. LOC delta: not measured.
  • sameSwitchbackIdentity's second argument is already a non-null switchback at its sole caller; smaller alternative removes unused both-non-switchback handling and checks only predecessor before comparing fields. Optional owner-acknowledged cleanup. LOC delta: not measured.

Run a simplification pass locally before pushing: these candidates cost less to address now than as a further review round.

@jervasion-absmartly jervasion-absmartly 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.

⚠️ Could not finish verification

The SDK checks pass and no verified code blocker survives. I am not approving yet because the PR still explicitly requires abs#5801 and abs#5759 to merge first; both remain open. This is the same outstanding merge prerequisite as the earlier review, not a new SDK defect.

Next step: Complete the stated platform merge prerequisites, then request the final merge-readiness check.

Suggestions

  • Two small optional simplifications and short comment cleanups are listed in the review details. None requires another review round.

What I checked

  • ✅ 2,926 test executions passed, with no failures, errors or skips: 731 core-api tests and 732 core-api-java6 tests, each on JDK 11 and JDK 25.
  • ✅ Both artifacts pass API compatibility, coverage gates, JAR packaging and Javadoc.
  • ✅ Exact-head Java-SDK CI passed its full clean build, including formatter checks.
  • ✅ Strengthened parity tests distinguish forced variants from the schedule draw and cover recorded strict mismatches versus silent malformed/missing-cluster cases.
  • ⚠️ Platform merge order remains incomplete; no coordinated Collector/warehouse/cross-SDK end-to-end run is claimed.
Review details

Scope and intent

Review round 8. Exact head 8fd4d4dfc6cb01435590cb453cdb348cdeefa68e; supplied base and verified merge-base 818d82d665c3a72af4c9fc49af5839e504070494. Reviewed the cumulative 22-file change and the delta after the round-7 head a05a8f97648dd0f803fa8ac8f1611b94e9536de7, branch history, current PR description, paginated conversation/reviews/inline replies, all three resolved review threads, and exact-head CI. No applicable AGENTS.md or CLAUDE.md was found. Read CONTRIBUTING.md, README.md, SWITCHBACK.md and the build/generation/workflow rules.

Intent is R33 ordered cluster-source serving and raw-key balanced-block schedules, with period-scoped assignment/exposure caches and no switchback holdouts. Actual consumers include treatment and variable APIs, rules/audiences/traffic, overrides/custom assignments, JSON deserialization/equality, refresh and publishing, in both native and generated-backport artifacts. The exposure payload remains unchanged. The latest delta strengthens tests, corrects documentation and simplifies sameSwitchbackIdentity without changing its sole caller's guaranteed installed-switchback precondition.

Verified facts: successful exact-head matrix/CI, two retained period indices, lazy generation invalidation, silent pre-anchor/unservable draw, and still-open merge prerequisites. abs#5723 is merged; direct PR API reads show abs#5801 and abs#5759 remain open/unmerged. The current PR body explicitly requires all three on main first. High-confidence inference: foundational pre-release integration, based on contract history, first-capable-release documentation and explicit merge ordering; no customer-adoption claim is needed.

Q1's owner answer remains consistent with code: getData exposes installed definitions and the existing unit path also compares assignment snapshots. Keep switchback snapshots and decide the broader mutation contract separately; no immutability guarantee is inferred. The earlier explicit acceptance of period-pinned cluster keys with real exposure-time attributes remains applicable. The optional sameSwitchbackIdentity cleanup has now landed. No unanswered author question remains.

Convergence summary — review round 8

  • Unresolved original blockers: 0
  • Remediation regressions: 0
  • Independent PR-change findings: 0
  • Acceptance criteria still open: none for a verified finding; stated platform merge prerequisites remain outstanding.
  • Human adjudication requested: no — no new material contract unknown was established.

Validation

Verified Java and javac 11.0.32.1 at /usr/lib/jvm/by-version/11; registered JDK 25 supplies testJdk25.

  • JAVA_HOME="${JAVA_HOME_11:?}" ./gradlew :core-api:test :core-api-java6:test :core-api:testJdk25 :core-api-java6:testJdk25 --rerun-tasks --no-daemon: passed, all 14 tasks executed. XML totals: 731/731 native and 732/732 backport on JDK 11/25; zero failures/errors/skips.
  • On the same JDK, ./gradlew :core-api:animalsnifferMain :core-api-java6:animalsnifferMain :core-api:jar :core-api-java6:jar :core-api:javadoc :core-api-java6:javadoc --no-daemon: passed as part of the combined verification invocation. ./gradlew :core-api:jacocoTestCoverageVerification :core-api-java6:jacocoTestCoverageVerification --rerun-tasks --no-daemon: passed.
  • Local ./gradlew clean build --no-daemon could not initialize the Groovy formatter because download.eclipse.org fails DNS resolution. Not claimed as a local pass. Exact-head Java-SDK run 43123523069, build job 130869696568, completed successfully, including unrestricted clean build with JDK 25 testing. Empty commit-status list is not a pending posted check. CodeRabbit is paused on an older head and is not used as exact-head evidence.
  • git diff --check 818d82d665 HEAD: passed. Golden suites execute 882 assignment and 504 permutation vectors; fixture hashes and attribute-path cases pass.
  • Independent test review checked meaningful variants plus all seven exposure flags across 12 branches; strict mismatch listing uses applies rather than assigned. No demonstrated vacuous test or uncovered observable change was established. No fresh mutation certification is claimed.

Passes (non-blocking)

Run: independent core runtime/API/data/concurrency/performance (six changed production Java files and consumers); dedicated error-handling/message specialist (malformed paths, JSON cycles/encoding, invalid schedules, load/refresh errors, exposure retry and publication recovery; completed with no surviving candidate); independent tests/CI/packaging (new suites, public behavior and generated java6 artifact); behavior-bearing fixtures (golden/path/wire data); operations/observability (encoding/cycle warnings and integration/upgrade guidance); independent cross-cutting simplicity; primary comment hygiene and diff composition. No selected specialist gap remains.

Not run: frontend/shared-component blast radius (no frontend source); deployment-manifest execution (no deployment manifests or operational commands changed).

Comment hygiene (non-blocking)

472 comment/documentation-content / 4275 code added lines; ratio ~1:9.1. Counts exclude empty comment and delimiter-only lines.

threshold T=43; restatements counted: yes (10 × C ≥ E)

Short restatement blocks remaining from earlier reviews, relative to core-api/src:

  • main/java/com/absmartly/sdk/Context.java:747,1554,1762 — retry clock, configuration comparison and silent flag; reason: restates code.
  • main/java/com/absmartly/sdk/internal/SwitchbackAttributePath.java:28,79 — parallel indices and primitive fast path; reason: restates code.
  • main/java/com/absmartly/sdk/json/Experiment.java:139 — ordered hash; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterRuleTest.java:54,134,262,284,511 — anchor/setup and tuple layout; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterTest.java:263 — control config; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackTest.java:54,344,1039,1376,1382,1419 — anchor/setup, cache bound, epoch/evaluation counters; reason: restates code.
  • test/java/com/absmartly/sdk/SwitchbackTestSupport.java:17,46,55 — clock/map helpers; reason: restates code.
  • test/java/com/absmartly/sdk/internal/SwitchbackAttributePathTest.java:117 — depth-bound setup; reason: restates code.
  • main/java/com/absmartly/sdk/Context.java:1807–1811 — rejected-slot pre-recheck history; reason: narrates history.

The existing promotion declines stand for the unchanged short, accurate, harmless blocks. New protocol constraints, independent-reference/fixture discrimination and caller-precondition explanations are preserved. The trims removed the bare-key, stale-slot and ordered-equality restatements. No comment finding is promoted.

Diff composition (non-blocking)

Every file is required for the change; none flagged. The pinned introduced_blobs.py completed successfully: 178 content writes, including superseded bucket implementation/fixtures and merge-written resolutions. Enumerated introducing commits, destination paths and postimages; inspected historical content and credential-pattern matches. Matches were README placeholder API-key examples, not credentials. No scratch, build artifact or secret finding.

Simplifications (non-blocking)

Two small candidates, neither a demonstrated measured simplification:

  • Context.java:2339–2344: skip resolveApplicableHoldouts for switchbacks instead of resolving/sorting then discarding the result. Smaller alternative: initialize holdouts only in the unit branch. LOC delta: not measured.
  • SwitchbackServing.java:122–127: replace the key-copy loop/index bookkeeping with keySet().toArray(new String[clusters.size()]), preserving declared iteration order. LOC delta: approximately -5, not independently demonstrated with a scratch alternative.

Run a simplification pass locally before pushing: these candidates cost less to address now than as a further review round.

@jervasion-absmartly jervasion-absmartly 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.

✅ Approved with suggestions

The R33 cluster-defined switchback implementation is ready to merge. No blocking issue survives, the SDK checks pass, and all three platform prerequisites—abs#5801, #5723 and #5759—are now merged, clearing the limitation in the earlier review.

Next step: None — ready to merge.

Suggestions

  • Three optional local simplifications and short comment cleanups are listed below. They do not require another review round.

What I checked

  • ✅ 2,926 test executions passed, with zero failures, errors or skips: 731 native and 732 generated-backport tests, each on JDK 11 and JDK 25.
  • ✅ Both artifacts pass API compatibility, coverage gates, JAR packaging and Javadoc checks.
  • ✅ Exact-head Java-SDK CI passed its full clean build, including formatting and JDK 25 testing.
  • ✅ Cluster ordering, raw-key schedules, period boundaries, refresh invalidation, concurrent exposure deduplication, assignment precedence and serialized exposure flags are covered.
  • ✅ The stated platform merge order is satisfied. The owner's accepted mid-period attribute behavior remains unchanged.
Review details

Scope, intent and evidence

Review round 9. Exact head 8fd4d4dfc6cb01435590cb453cdb348cdeefa68e; supplied base and verified merge-base 818d82d665c3a72af4c9fc49af5839e504070494. Re-read the cumulative 22-file diff, branch history, description, paginated conversation and previous reviews, inline replies and all three resolved threads, and exact-head Actions jobs/statuses. This is the same SDK head as round 8; the material external change is that the platform prerequisites have merged. No applicable AGENTS.md or CLAUDE.md exists. Read CONTRIBUTING.md, README.md, SWITCHBACK.md and relevant build/generation/workflow configuration.

Intent and affected consumers match: ordered cluster-source resolution and raw-key balanced-block assignment flow through treatment and variable APIs, rules/audiences/traffic, overrides/custom assignments, refresh/cache lifecycle, JSON equality/deserialization and exposure publishing, in both artifacts. Holdouts do not apply to switchbacks. Publish schemas remain unchanged. Nullable fields preserve unit defaults.

Verified through direct PR API reads: abs#5801, #5723 and #5759 are closed and merged. The stated prerequisite is merge order, now satisfied; this is not evidence of deployment or customer adoption. High-confidence inference remains foundational pre-release integration, based on contract history and first-capable-release documentation. Release numbering and upgrading every serving SDK remain documented release responsibilities, not additional merge blockers. No coordinated live Collector/warehouse/cross-SDK end-to-end execution is claimed.

Q1's owner answer remains consistent with code: retain assignment config checks and decide the broader definition-mutation contract separately. No immutability promise is inferred. The owner explicitly accepts that a period-pinned cluster can differ from exposure-time attribute resolution after a mid-period attribute change; that specific contamination case is not reopened. No unanswered author question remains.

Convergence summary — review round 9

  • Unresolved original blockers: 0
  • Remediation regressions: 0
  • Independent PR-change findings: 0
  • Acceptance criteria still open: none; previous platform merge prerequisites are satisfied.
  • Human adjudication requested: no — no new material unknown remains.

Validation

Verified Java and javac 11.0.32.1 at /usr/lib/jvm/by-version/11; installed JDK 25 supplies testJdk25.

  • JAVA_HOME="${JAVA_HOME_11:?}" ./gradlew :core-api:test :core-api-java6:test :core-api:testJdk25 :core-api-java6:testJdk25 --rerun-tasks --no-daemon: passed, all 14 tasks executed. XML totals: 731 native and 732 backport tests on each runtime, zero failures/errors/skips. Independently rerun by the primary after the runtime pass.
  • Both animalsnifferMain tasks passed. Both JAR and Javadoc tasks passed. ./gradlew :core-api:jacocoTestCoverageVerification :core-api-java6:jacocoTestCoverageVerification --rerun-tasks --no-daemon passed.
  • An initial combined compatibility/coverage invocation triggered Gradle's existing implicit-task-dependency validation; separate coverage succeeded without source changes. Build wiring is unchanged from base. Local full check/Spotless initialization was prevented by Eclipse formatter DNS resolution; not claimed as a local pass. Exact-head Java-SDK run 43123523069 and its build job completed successfully, covering clean build and formatting. The empty commit-status list is not a posted pending check. Paused older-head CodeRabbit output is not exact-head evidence.
  • git diff --check 818d82d HEAD: passed. Golden suites execute 882 assignment and 504 permutation vectors; attribute-path and fixture-hash tests pass.
  • Independent test review found no demonstrated vacuous test or uncovered observable change. Existing test declarations are retained; ContextHoldoutTest's reflective helpers adapt private signatures without removing assertions. No new mutation certification is claimed. The known generation-only periodMs mutation does not demonstrate changed observable behavior because snapshots still invalidate it.

Passes (non-blocking)

Run: independent runtime/API/data/concurrency/performance (six production Java files and consumers); dedicated error-handling/message specialist (malformed paths/configs, JSON cycles/encoding, invalid schedules, exposure retirement/retry and publication recovery; completed with no surviving candidate); independent tests/CI/packaging (public behavior, added suites and generated Java 6 artifact); behavior-bearing fixtures (golden/path/wire inputs); operations/observability (encoding warnings and rollout guidance); independent cross-cutting simplicity; primary comment hygiene and diff composition.

Not run: frontend/shared-component interaction (no frontend source); deployment-manifest execution (no deployment manifests or operator commands changed). No selected specialist gap remains.

Cold resolution compares S sources against U context units, scans timestamped attributes for matching sources, and checks V allow-list entries; non-scalar roots undergo JSON normalization. Each draw builds an arms-sized permutation. Retention is bounded to two period indices plus the possible bare-name slot. No material work-scaling regression was established.

Comment hygiene (non-blocking)

472 comment/documentation-content / 4275 code added lines; ratio ~1:9.1. Counts exclude empty comment and delimiter-only lines and were recomputed at this head.

threshold T=43; restatements counted: yes (10 × C ≥ E)

Flagged blocks, relative to core-api/src/:

  • main/java/com/absmartly/sdk/Context.java:747,1554,1762 — retry clock, config comparison and silent flag; reason: restates code.
  • main/java/com/absmartly/sdk/internal/SwitchbackAttributePath.java:28,79 — parallel indices and primitive fast path; reason: restates code.
  • main/java/com/absmartly/sdk/json/Experiment.java:139 — ordered hash; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterRuleTest.java:54,134,262,284,511 — anchor/setup and tuple layout; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackClusterTest.java:263 — control config; reason: restates code.
  • test/java/com/absmartly/sdk/ContextSwitchbackTest.java:54,344,1039,1376,1382,1419 — anchor/setup, cache bound and evaluation counters; reason: restates code.
  • test/java/com/absmartly/sdk/SwitchbackTestSupport.java:17,46,55 — clock/map helpers; reason: restates code.
  • test/java/com/absmartly/sdk/internal/SwitchbackAttributePathTest.java:117 — depth-bound setup; reason: restates code.
  • main/java/com/absmartly/sdk/Context.java:1807–1811 — rejected-slot pre-recheck history; reason: narrates history.

Prior promotion declines stand: the named lines retain their content and classification, are short, accurate and harmless, and no new qualifying line has appeared since round 8. Protocol constraints, fixture/reference discrimination and non-obvious caller-precondition explanations are preserved. No comment finding is promoted.

Diff composition (non-blocking)

Every file is required for the change; none flagged. The pinned introduced_blobs.py completed successfully: 178 content writes, including superseded bucket code/fixtures and merge resolutions. Enumerated introducing commits, destination paths and postimages and scanned all 178 postimages. Credential-pattern matches were README placeholder API-key examples, not secrets. No scratch report, build output or secret finding.

Simplifications (non-blocking)

Three candidates; none is a demonstrated measured simplification:

  • Context.java:2339–2344: avoid resolving/sorting applicable holdouts for switchbacks only to discard them. Smaller alternative: initialize holdouts only in the unit branch. LOC delta: not measured.
  • SwitchbackServing.java:122–127: replace the key-copy loop/index with keySet().toArray(new String[clusters.size()]), preserving declared order. LOC delta: approximately −5; no scratch equivalence run.
  • Context.java:1447–1451: inline the single-use ruleUnitType conditional into its resolveRule call, retaining serving-unit versus declared-unit semantics. LOC delta: approximately −3; no scratch equivalence run.

Run a simplification pass locally before pushing: these candidates cost less to address now than as a further review round.

@joalves
joalves merged commit 07807b5 into main Nov 17, 2026
2 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