Skip to content

feat(campaign): the ceiling verbs — a target system's or the global ceiling changed live, audited, from the API or the governor (R3-S9, #318) - #581

Open
omercelikdev wants to merge 3 commits into
mainfrom
agent/318-ceiling-verbs
Open

omercelikdev wants to merge 3 commits into
mainfrom
agent/318-ceiling-verbs

Conversation

@omercelikdev

Copy link
Copy Markdown
Collaborator

What and why

This is Campaign R3-S9 (#318), which is also admin-contract R4-S6 (R4.5). R3-S8 (#290) made target-system ceilings rows the pacer reads every tick, but only a database edit could change one. This PR adds the audited verb an operator uses during an incident, the four routes R4.5 writes, the governor screen that shows and edits the ceiling binding a campaign, a runbook item, and S-FLEET-03 extended on a real broker.

  • Admin service (the RFC's R3.2 API block, additions only):
    • GetCeilingsAsync: the global row (*), then every declared target system by name. Each carries its live maxTps (the pacer's reading: an unseeded row or a NULL target row reads as code, below zero reads as 0), codeMaxTps, the types it binds, and updatedAt/updatedBy. A row left by a system no longer declared is not listed.
    • ThrottleCeilingAsync(kind, name, patch, actor, ct):
      • one update guarded on the value it read, re-read on a lost race (8 attempts, as the campaign throttle), so the audit's old → new is the change actually made;
      • when the leader has not seeded the row yet, an insert carrying the code seed, so Q4's seed rule then sees an operator's row. A primary-key conflict with the leader is re-read once; a second insert failure reaches the caller instead of reading as a lost race.
    • Every applied change writes a GoldpathCampaignAudit row: CampaignId = Guid.Empty, action ceiling, the actor (bounded to 256), detail target system 'x': MaxTps 200/s -> 100/s.
    • GetCeilingAuditAsync(take): ceiling rows only, newest first (ties broken by id).
    • Refused with teaching text: clearing a target system ("set a high number instead"); an undeclared name, naming the declared ones (a case variant is another name, since the row key is ordinal); a value below 1; a patch naming both fields or neither; the global kind under any name but *.
  • Routes (R4.5): GET /ceilings, POST /ceilings/global/throttle, POST /ceilings/target-systems/{name}/throttle, GET /ceilings/audit?take=. They sit in the campaign group, so the all-tenants filter and R4.1's split apply unchanged. An undeclared name answers 400, not 404. RouteContractTests gains the four lines, and the contract inventory gains two rows.
  • Console: the governor shows a "Target-system ceiling" section for a campaign whose type names one. It shows the live value, the code value, the types sharing it and who moved it last, and edits it through the verb with a confirm naming old → new and every type it binds. A non-integer or a value below 1 is named before anything is sent. A server that cannot answer /ceilings shows "not available from this server", never a number.
  • Runbook item 15: changing a target-system ceiling during an incident. Item 3 points to it.
  • The test host behind the console smoke gains AddTargetSystem("device-core", 50) and a config-push type naming it.

A note on the issue's "red on main (two type buckets sum above the system's rate)". #290 has since landed the shared bucket on main, so on main the new integration test is red only because the verb does not exist. The two-buckets world is planted below as fault P2 instead, and it goes red.

Reproduce

git fetch origin agent/318-ceiling-verbs && git checkout agent/318-ceiling-verbs
dotnet build Goldpath.sln -c Release                                  # 0 warnings, 0 errors
U="FullyQualifiedName~R3TargetSystemTests|FullyQualifiedName~RouteContractTests"
dotnet test tests/Goldpath.Campaign.Tests -c Release --no-build --filter "$U"      # green (whole project: 535/535)
S=packages/Goldpath.Campaign/GoldpathCampaignAdminService.cs

# RED U1: the update matches by kind OR name -> ASystemNamedLikeTheGlobalRow_IsItsOwnRow_ForTheListAndTheVerb red
sed -i 's/.Where(c => c.Kind == kind \&\& c.Name == name \&\& c.MaxTps == read)/.Where(c => (c.Kind == kind || c.Name == name) \&\& c.MaxTps == read)/' $S
dotnet build tests/Goldpath.Campaign.Tests -c Release -v q && dotnet test tests/Goldpath.Campaign.Tests -c Release --no-build --filter "$U"; git checkout $S
# RED U2: clearing a target system allowed -> ATargetSystemIsNeverCleared_… and TheCeilingRoutes_… red
sed -i 's/            if (patch.ClearMaxTps)\r\?$/            if (false \&\& patch.ClearMaxTps)/' $S      # (build + test as above); git checkout $S
# RED U3: route renamed -> RouteContractTests + TheCeilingRoutes_BindTheNameAndTheBody_… red
sed -i 's|"/ceilings/audit"|"/ceiling/audit"|' packages/Goldpath.Campaign/GoldpathCampaignAdminEndpoints.cs   # (build + test); git checkout packages/

# Real broker + PostgreSQL (Docker) — S-FLEET-03 extended, ~18 s
I="FullyQualifiedName~CampaignCeilingVerbTests"
dotnet test tests/Goldpath.IntegrationTests -c Release --no-build --filter "$I"    # green (4 of 4 runs here)
# RED P1: the verb leaves the row's value -> "from one tick after the change … released 15 across both types > 8"
sed -i 's/                        .SetProperty(c => c.MaxTps, target)/                        .SetProperty(c => c.MaxTps, read)/' $S
dotnet build tests/Goldpath.IntegrationTests -c Release -v q && dotnet test tests/Goldpath.IntegrationTests -c Release --no-build --filter "$I"; git checkout $S
# RED P2: one bucket per (system, type), each at the system's rate (the pre-#290 world)
#   -> "before the change one second of ticks … released 24 across both types > 20" (22 on a second run)
J=packages/Goldpath.Campaign/GoldpathCampaignJobs.cs
python3 - <<'PY'
p='packages/Goldpath.Campaign/GoldpathCampaignJobs.cs'; s=open(p).read()
s=s.replace('''                foreach (var (system, maxTps) in ceilings.TargetSystems)
                {
                    targetBudgets[system] = Refill(targetBudgets.GetValueOrDefault(system), maxTps, _options.LeaderTick);
                }''','''                foreach (var t in _options.Types.Where(t => t.TargetSystem is not null))
                {
                    var key = t.TargetSystem + "/" + t.Key;
                    targetBudgets[key] = Refill(targetBudgets.GetValueOrDefault(key), ceilings.TargetSystems[t.TargetSystem!], _options.LeaderTick);
                }''')
s=s.replace('=> _options.TypeMap.TryGetValue(type, out var registered) ? registered.TargetSystem : null;',
            '=> _options.TypeMap.TryGetValue(type, out var registered) && registered.TargetSystem is { } sys ? sys + "/" + type : null;')
open(p,'w').write(s)
PY
dotnet build tests/Goldpath.IntegrationTests -c Release -v q && dotnet test tests/Goldpath.IntegrationTests -c Release --no-build --filter "$I"; git checkout $J

# The verbs on PostgreSQL and Oracle (the guarded update compares a NULL it read), and the role split over HTTP
dotnet test tests/Goldpath.IntegrationTests -c Release --no-build --filter "FullyQualifiedName~CampaignCeilingProof|FullyQualifiedName~CampaignCeilingOracleProof|FullyQualifiedName~AdminReadRoleSurfaceTests"

# Console
cd ui/console && pnpm install --frozen-lockfile && pnpm typecheck && pnpm test   # 339 green, floors held
# RED C1: the target-system name not encoded -> adminClient.test.ts "R4.5: the ceiling routes …" red
sed -i 's|${encodeURIComponent(target.targetSystem)}/throttle|${target.targetSystem}/throttle|' src/adminClient.ts && npx vitest run src/adminClient.test.ts; git checkout src/adminClient.ts
cd ../.. && scripts/console-smoke.sh     # 52 passed, incl. the R3.2 governor journey and its axe scan

I ran every plant (U1–U3, P1, P2, C1) and saw each go red as described. With the code restored, everything is green. (The console smoke here ran with PLAYWRIGHT_BROWSERS_PATH pointed at the sandbox's preinstalled Chromium 1243, because the pinned Playwright 1.64.1 asks for build 1248. That is an environment detail; no repo change.)

Acceptance criteria (#318), with evidence

  • Admin service: GetCeilingsAsync (kind, name, live and code values, bound types, updated at/by), ThrottleCeilingAsync(kind, name, patch, actor, ct), GetCeilingAuditAsync, following R3.2's block, additions only. PublicAPI.Unshipped.txt carries exactly the RFC's lines plus the members the two records synthesize. Proof: R3TargetSystemTests (TheCeilingsList_…, Throttling…_AuditsOldToNew, TheGlobalCeiling_IsSetAndSwitchedOff, …).

  • The routes follow admin-contract R4 (the four proposed); RouteContractTests updated in the same PR. Mapped as R4.5 writes them. Proof: RouteContractTests, plus TheCeilingRoutes_BindTheNameAndTheBody_AndAnUndeclaredNameAnswers400 over TestServer.

  • Every change writes a GoldpathCampaignAudit row with CampaignId = Guid.Empty, action ceiling, the actor and old → new. Proof: the unit facts, plus the PostgreSQL/Oracle scenario step 5 and CampaignCeilingVerbTests on a real broker.

  • Clearing only on the global row; a target system without a ceiling is refused with teaching text. Proof: ATargetSystemIsNeverCleared_AndTheRefusalSaysToSetAHighNumber, and the HTTP fact (400).

  • The console governor shows the ceiling that binds a campaign and edits it; the vitest floor and axe hold. Proof: CampaignPanel.test.tsx (5 new facts) and adminClient.test.ts; pnpm test 339 green with coverage at 98.11 / 91.18 / 97.73 / 99.07 against the 97/85/75/97 floors; the console smoke's campaign R3.2: … journey and the …target-system ceiling has no serious accessibility violation axe scan, both green (52/52).

  • A runbook item covers changing a target-system ceiling during an incident. ops/runbooks.md item 15.

  • Proof, S-FLEET-03 extended on Testcontainers RabbitMQ + PostgreSQL, strict ceiling:

    • two campaigns of different types on one system never jointly exceed its ceiling in any one-second window of ticks (seed 20/s: every second ≤ 20, no tolerance);
    • a live change through the admin verb bites within one leader tick (lowered to 8/s: every second of ticks from commit + one 100 ms tick holds ≤ 8);
    • the audit row carries the actor.

    Green 4 of 4 runs; red with P1 and P2. CampaignCeilingVerbTests.

  • A viewer reads /ceilings and is refused the verb (R4.5's own proof). AdminReadRoleSurfaceTests enumerates every campaign route, so the four new ones are covered: the viewer reads /ceilings and /ceilings/audit with 200, and both POSTs answer the worded 403 envelope. Green 4/4.

Pre-PR self-check

  • Every criterion is met with its evidence (above).
  • Ledgers and docs in this PR:
    • CHANGELOG [Unreleased];
    • upgrade guide preview.10 (the "verbs arrive with R3-S9" line rewritten; additive routes);
    • admin-contract inventory rows only (the R4 decision text is untouched);
    • campaign README (the "Not yet" bullet replaced);
    • runbooks item 15;
    • docs/rfc/README.md index row (landed: R3-S8, R3-S9, R3-S10; not yet: Campaign R3-S11 (R3.6b): S-OPS-03 on a real broker, the suspended view in the console, R3 closed #319);
    • open-threads T39 (R3-S9 landed; no new thread, and nothing deferred);
    • scenario-campaign S-FLEET-03 evidence;
    • ga-gate-status.md G10a row (S-FLEET-03 extended). Nothing was edited in goldpath-ga-readiness.md;
    • stryker/README.md (the scoped run).
  • XML docs: the new members sit after existing members' declarations, never between a /// block and its declaration (re-read every hunk).
  • Honesty: the README, runbook and CHANGELOG claims were checked against the code.
    • "binds the next tick": the pacer reads the rows every tick (R3-S8), and it is measured on a real broker.
    • "an operator's value stands": proven by the seed-rule facts both ways.
    • "listed by name": the list is sorted ordinally, not by Dictionary order.
  • Wired: the routes are proven over TestServer and in the cross-surface role host; the console journey runs against a real host (console smoke).
  • Contract and code agree: { maxTps?, clearMaxTps? }, both optional and refused when both or neither is named; take defaults to 100, clamped by AdminPaging.
  • No bench added. The new broker fact is not Category=Bench and runs in the quartz-process-globals collection like CampaignR1Tests.
  • Deep self-review:
    • Security / authZ: the routes inherit the group's OpsRead/Ops split and the all-tenants filter (AdminReadRoleSurfaceTests). Input is bounded: the name appears in a refusal truncated to 128 (WithNoSystemDeclared_…AHugeNameIsBoundedInIt, a 5,000-char name), and the actor is truncated to the 256 columns (ALongActor_IsBoundedToTheColumns). EF parameterizes everything; no raw SQL. No new dependency. The logs carry the actor principal, as every campaign verb's log already does, and no secrets.
    • Edge cases: null patch (ArgumentNullException), null/empty/case-variant name, 0/−1, both/neither, NULL target row, negative row (reads 0, as the pacer binds it), a system literally named *, global off → on (the NULL guard, on SQLite, PostgreSQL and Oracle), and tr-TR (names are ordinal; the engine's existing tr-TR fact covers the declaration).
    • Concurrency: a change landing between the read and the update (AChangeThatLandsBetweenTheReadAndTheUpdate_…), every update raced (AVerbThatLosesEveryRace_…: 8 attempts, nothing applied, no audit row), the leader winning the insert (AnInsertThatMeetsTheLeadersRow_…), and an insert refused for another reason (AnInsertRefusedForAnotherReason_…: it surfaces after one re-read).
    • Migrations: none. The table is R3-S1's.
    • Performance: a handful of rows per call; the audit read is take-clamped.
    • Compatibility: additive only. No route, envelope or field changes, and the R3 client is unaffected.
    • Code quality: the formatter is clean, the solution has 0 warnings, and there is no suppression.
  • Mutation: a scoped Stryker run over the new methods scored 84.96 % on the first pass and 99.12 % after the eleven facts it named. The last survivor is killed since, planted by hand. One equivalent mutant was removed by simplifying the line. Recorded in stryker/README.md.

Gates run

  • ./scripts/docs-freshness.sh, ledger-check.sh (no authenticated gh here, so it skipped honestly), schema-honesty.sh, skills-parity.sh, template-pins.sh: all exit 0.
  • dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors. dotnet format whitespace --verify-no-changes is clean on the touched projects.
  • Goldpath.Campaign.Tests: 535/535.
  • Integration: CampaignCeilingVerbTests, CampaignCeilingProof, CampaignCeilingOracleProof (Oracle Free 23.26 slim, re-run on the committed head), CampaignR1Tests (its tick-window helper is now internal static and shared) and AdminReadRoleSurfaceTests: all green.
  • Console: tsc --noEmit clean, pnpm test 339 green with the floors held, scripts/console-smoke.sh 52 passed.

What I could not verify

Closes #318


Generated by Claude Code

…eiling changed live, audited, from the API or the governor (R3-S9, #318)

Campaign R3.2 part b and admin-contract R4.5 (slice R4-S6).

- GoldpathCampaignAdminService: GetCeilingsAsync, ThrottleCeilingAsync and
  GetCeilingAuditAsync, with GoldpathCampaignCeilingInfo and
  GoldpathCampaignCeilingPatch (the RFC's API block, additions only).
- Four routes under the campaign mount: GET /ceilings,
  POST /ceilings/global/throttle, POST /ceilings/target-systems/{name}/throttle,
  GET /ceilings/audit. Viewer reads, operator changes (R4.1); the route
  freeze gains the four lines.
- A change is an update guarded on the value read (re-read on a lost race),
  or an insert carrying the code seed before the leader seeds the row; it is
  audited with CampaignId = Guid.Empty, action "ceiling", actor, old -> new.
- Refused in words: a cleared target system, an undeclared name (the
  declared ones named), a value below 1, a patch naming both or neither.
- The governor shows the target-system ceiling that binds a campaign and
  edits it; runbook item 15.
- S-FLEET-03 extended on RabbitMQ + PostgreSQL (CampaignCeilingVerbTests).

Closes #318

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AFdNb6HPHypNiQbkaNAxH
@omercelikdev omercelikdev added the agent-pr PR opened by the overnight agent label Nov 14, 2026
@github-actions github-actions Bot added the tier:C ADR-0014 Tier C: decisions, releases, gates, policy, agent layer; the owner merges label Nov 14, 2026
var detail = $"{subject}: MaxTps {DescribeTps(before)} -> {DescribeTps(target)}";
await AuditAsync(db, Guid.Empty, "ceiling", who, Bound(detail, 1024), ct);
_logger.LogInformation("Campaign ceiling {Kind} '{Name}': {Before} -> {After} by {Actor}.",
kind, name, DescribeTps(before), DescribeTps(target), who);
@omercelikdev

omercelikdev commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

CI on 1ed9567: every check is green except merge-policy, which is red by design for Tier C (docs/rfc/**, docs/upgrades/**) without owner-approved.

  • Green: gates (build, unit tests, format, licence, every ledger and freeze gate), integration, oracle, kit (console tests), both CodeQL scans, and all 12 golden-manifest shapes.
  • gm / GmSixGateway, attempt 1, was red, and the cause was not this diff. The generated app built cleanly and passed specdrift. Its smoke test then failed inside Aspire's container-runtime check, before any test ran: Application orchestrator dependency check returned an error: The operation has timed out … /usr/bin/podman container ls --last 1 --quiet. The runner's podman did not answer DCP within its timeout.
  • Attempt 2, the single allowed re-run, passed (01:42 → 01:45 UTC, the smoke step in 2 min 18 s). An earlier edit of this comment said that attempt looked hung. That was wrong: I read stale job status.

Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Verifier verdict (run 2026-11-14)

Verdict: changes requested. 1 MAJOR, 2 MINOR, 3 NIT. The core of the slice is sound. The verbs, refusals, authZ split, routes and pacer binding all reproduce, and every plant I ran goes red. One documented behaviour is untrue, though: "setting the code value back hands the row back to code" fails as soon as code changed while the row was moved.

  • Head verified: 1ed9567f0e (single commit). Base: main.
  • Sandbox: 4 vCPU / 15 GB, shared with another verification run. Docker (PostgreSQL 17, RabbitMQ 4, Oracle Free) is local.

Steps 1–6

# Step Result Evidence
1 Scope ✓ 25 files. Every #318 criterion is addressed: service verbs, the four R4.5 routes + RouteContractTests, the Guid.Empty/ceiling audit, the clear refused on target systems, the console governor, runbook item 15, S-FLEET-03 extended. No dependency, workflow, threshold or Stryker-config change. stryker/README.md gains a run record only. No tests are deleted or weakened; CampaignR1Tests only makes its tick-window helper internal static.
2 Rules ✓ goldpath-review rule set applied. PublicAPI.Unshipped.txt matches the two records and three methods, including the members the records synthesize. XML docs sit on the new members and never between an existing /// block and its declaration. CHANGELOG [Unreleased] entry is present. The ledgers are touched in the same PR (open-threads T39 row, ga-gate-status G10a, admin-contract inventory rows, RFC index, upgrade guide). No new T-number, so no collision.
3 Confidentiality ✓ Case-insensitive grep of the diff, the commit message and the PR body for the full list, plus token and secret patterns: 0 hits.
4 Reproduce ✓ dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors. Goldpath.Campaign.Tests: 535/535. Gates: docs-freshness, schema-honesty, skills-parity, template-pins rc 0; ledger-check rc 0 but skipped (no authenticated gh in this sandbox). Integration (real PG + RabbitMQ): CampaignCeilingProof, AdminReadRoleSurfaceTests, CampaignR1Tests green; CampaignCeilingOracleProof green on Oracle Free. CampaignCeilingVerbTests: see MINOR 2. Console: tsc --noEmit clean; CampaignPanel.test.tsx + adminClient.test.ts 73/73.
4b Red→green ✓ U2 (clear allowed on a target system): ATargetSystemIsNeverCleared_… + TheCeilingRoutes_… RED, then GREEN on restore. P1 (the verb leaves MaxTps unchanged): CampaignCeilingVerbTests RED with "released 12 across both types > 8", restored. C1 (name not URI-encoded): adminClient.test.ts "R4.5: the ceiling routes …" RED, restored.
5 CI ✓ (Tier C) On 1ed9567: gates, integration, oracle, kit, golden manifests (PR subset), all gm / *, review, alert-rules, CodeQL (cs + js) all green. merge-policy: one run green, one red by design (Tier C needs owner-approved).
6 Charter n.a.

Deep review

Area Result
a Security ✓ The four routes live in the campaign group, so the all-tenants filter and R4.1's OpsRead/Ops split apply. AdminReadRoleSurfaceTests enumerates them: a viewer gets 200 on both GETs and the worded 403 on both POSTs (green here). The name is checked against the declared set before use, and its echo is bounded to 128. The actor is bounded to 256 and the detail to 1024. Everything is EF-parameterized, with no raw SQL. Logs carry the declared name and the principal only. No new dependency.
b Correctness Finding (MAJOR 1, MINOR 1). Otherwise ✓: null/empty/undeclared/case-variant names, 0 and −1, both or neither field, global under a non-* name, an unknown enum value and int.MaxValue (probe P2) all behave as specified. tr-TR: names are ordinal, and CaseFoldingIsCultureBlind_UnderTurkish passes.
c Concurrency ✓ The update is guarded on the value read and re-read on a lost race (8 attempts). It composes correctly with the leader's follow, which is guarded on SeedMaxTps == MaxTps == seeded. The insert-vs-seed primary-key race is re-read once. My parallel-verbs probe could not run meaningfully on the shared SQLite connection (SQLITE_BUSY), so this rests on the PR's interceptor facts and my reading. NIT 2 is the residual ordering issue.
d Data / migrations ✓ None. R3-S1's table. The guarded update comparing a NULL it read is proven on PG and Oracle (CampaignCeilingProof step 5, both green).
e Performance ✓ A handful of rows per call. The audit read is clamped by AdminPaging.Clamp (probe P4: take of −5, 0 and int.MaxValue → 1, 1, all).
f Compatibility ✓ Additive only: new routes, new records, new methods. No envelope or field changes.
g Test quality Finding (MINOR 2). The mutation record (99.12 % on the new span) holds against my plants.
h Code quality ✓ Follows the throttle verb's idioms. Comments explain why. No suppression. NIT 1.
i Operability ✓ Runbook item 15, an Information log per change with old → new and the actor, and a worded refusal for every bad input.
j Honesty Finding (MAJOR 1): the hand-back promise in the XML doc, runbook and upgrade guide does not hold after a code change. The other claims hold ("binds the next tick" was measured; "listed by name, ordinal" and "a viewer reads, an operator changes" were tested).

Edge-case probes (mine, throwaway, nothing pushed)

# Probe Result
P1 Code 200 → operator 100 → release seeds 300 (operator's 100 stands) → operator sets codeMaxTps (300) → release seeds 400: expect 400, as runbook item 15 says FAIL: the row stays at 300. See MAJOR 1.
P2 maxTps = int.MaxValue through the verb; Refill(0, int.MaxValue, 100 ms) ✓ accepted and stored; refill 214748364.7 (no overflow)
P3 Declared names core/eu, çekirdek İ, a b, POSTed through the HTTP route URI-escaped (as the console does) çekirdek İ ✓, a b ✓; core/eu FAIL: 400 "No target system 'core%2Feu' is declared. The declared ones: 'core/eu'." See MINOR 1.
P4 GET /ceilings/audit?take= −5 / 0 / 2147483647 ✓ 1 / 1 / 2 rows, newest first, never a 500
P5 16 verbs in parallel on one row (SQLite) inconclusive: the shared in-memory SQLite connection throws SQLITE_BUSY, so this does not test the verb. Not counted.

Findings

  1. MAJOR: "set it to the code value to hand it back to code" is untrue once code has changed while the row was moved.

    • Where: packages/Goldpath.Campaign/GoldpathCampaignAdminService.cs:409 (the guarded update sets MaxTps but never SeedMaxTps). The promise appears at :344 (XML doc), packages/Goldpath.Campaign/ops/runbooks.md:238 and docs/upgrades/0.1.0-preview.10.md:254.
    • What happens:
      • Seed 200; the operator sets 100, so the row is MaxTps 100 / Seed 200.
      • A release seeds 300. The leader warns and keeps 100, and Seed stays 200.
      • The operator follows the runbook and sets codeMaxTps = 300, so the row is MaxTps 300 / Seed 200. That is still "moved" (MaxTps != SeedMaxTps).
      • The next release seeds 400. The row stays at 300 (probe P1), and the leader logs the operator-disagreement warning on every slice, even though the operator is at code's value.
    • Why it matters: an operator who hands a ceiling back after an incident believes code owns it again. The next deploy's value is silently ignored, which is the very drift owner decision Q4's rule exists to prevent. SettingTheCodeValueBack_HandsTheRowBackToCode only covers the case where code had not moved.
    • Fix expected: when the target equals the current code value, the verb also resets SeedMaxTps to it. For example, add .SetProperty(c => c.SeedMaxTps, c => target == code ? code : c.SeedMaxTps) to the update (the insert path already seeds code). Add the fact above (200 → 100 → release 300 → set 300 → release 400 ⇒ 400, and no disagreement warning logged), shown red without the fix. I checked this fix in my sandbox: P1 goes green and all 66 existing R3TargetSystemTests + RouteContractTests stay green. Alternatively, if hand-back is meant only for an unchanged code value, say so in all three docs, but then the runbook offers no way to hand a row back at all.
  2. MINOR: a declared target system whose name contains / cannot be changed through the route or the console.

    • Where: GoldpathCampaignAdminEndpoints.cs:80 ({name}) together with GoldpathCampaignOptions.AddTargetSystem (:510), which accepts any non-blank name up to 128 characters.
    • What happens: ASP.NET Core leaves %2F encoded in a route value. The console's correct encodeURIComponent therefore reaches the service as core%2Feu, which is refused as undeclared (probe P3). The name still shows in GET /ceilings, and the governor offers the edit, which always fails.
    • Fix expected: either refuse / (and any other character the route cannot carry) at AddTargetSystem with teaching text, plus a declaration fact, or unescape the route value before the lookup, plus an HTTP fact for core/eu. Prefer the declaration refusal: it keeps the name and the URL one-to-one.
  3. MINOR: CampaignCeilingVerbTests is load-sensitive. Its sample-count guards fail under CPU load.

    • Where: tests/Goldpath.IntegrationTests/CampaignCeilingVerbTests.cs:124 and :137, the fixed Task.Delay(6 s) / Task.Delay(8 s), followed by the before.Count >= 40 / after.Count >= 24 guards.
    • What happened here: 4 runs on a loaded 4-vCPU box (load average 5–9) gave 1 green and 3 red: "only 39 releases before the change", then "only 15" and "only 21 releases after the change". The ceiling bounds themselves held in every run. Releases happen only inside leadership slices fired by a 5 s cron, and under load the slices start late, so a fixed wall-clock window samples too few.
    • Why it matters: this fact runs in the required integration lane. A busy hosted runner will turn it red for no product reason.
    • Fix expected: wait on the condition, not the clock. Poll until before.Count >= SeedTps * 2 (with the 3-minute token as the bound) before calling the verb, then poll until after.Count >= LoweredTps * 3. Keep the strict per-second assertions unchanged.

NITs (optional)

  1. The ceiling change and its audit row are two commits: ExecuteUpdateAsync, then AuditAsync's SaveChangesAsync. A failure between them applies an unaudited change. This is the same pattern as the existing campaign throttle, so it is not a new risk; worth a line in the runbook or a follow-up.
  2. The audit's At is stamped when the audit row is written, not when the update applied (now). Under two near-simultaneous verbs, GET /ceilings/audit can list them in the opposite order to how they applied. Passing now into the audit row would make the listing match the row's UpdatedAt.
  3. A known textual conflict with feat(campaign): failures by code with a cursor, and the outcomes aggregate (admin-contract R4.2 + R4.3, #296) #575 in tests/Goldpath.Campaign.Tests/RouteContractTests.cs: I trial-merged main + feat(campaign): failures by code with a cursor, and the outcomes aggregate (admin-contract R4.2 + R4.3, #296) #575 + this PR. The PR body already says whichever lands second merges the other in, so this is just a heads-up.

What I could not run

  • ledger-check.sh against GitHub (no authenticated gh; it skipped honestly).
  • A full mutation-gate.sh Goldpath.Campaign run.
  • The console smoke (scripts/console-smoke.sh) and axe scan. I ran only vitest and tsc.
  • A meaningful concurrent-verbs probe on PostgreSQL.

Generated by Claude Code

@omercelikdev omercelikdev added the changes-requested Verifier found problems; the worker fixes these first label Nov 14, 2026
…me is refused at declaration, the verb fact waits on samples (R3-S9, #318)

Verifier findings on 2026-11-14:

- MAJOR 1: setting a ceiling to the current code value now resets the
  row's seed to that value as well, so MaxTps == SeedMaxTps and the next
  release is followed even when code changed while the operator held the
  row. The guarded update also compares the seed it read.
  SettingTheCodeValueBack_AfterCodeMoved_HandsTheRowBackToCode (target
  system and global) and step 6 of CampaignCeilingProof (PostgreSQL and
  Oracle) are red without it.
- MINOR 1: AddTargetSystem refuses a name containing '/', because
  ASP.NET Core leaves %2F encoded in a route value and the name could be
  listed but never changed. A name the console escapes otherwise
  ('çekirdek İ a%b') is proven to reach the verb over HTTP.
- MINOR 2: CampaignCeilingVerbTests keeps its fixed windows as minimums
  and then waits until enough releases were sampled, rather than failing
  its sample-count guards when the slices start late under load.
- NIT 2: the ceiling audit row is stamped with the instant the change
  applied (the row's UpdatedAt).

Runbook item 15, the preview.10 upgrade guide and the CHANGELOG entry
say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AFdNbaFtJ7VPJp83KV9Jh
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Addressed verifier findings: MAJOR 1 (hand-back after code moved), MINOR 1 (a / in a target-system name), MINOR 2 (the load-sensitive verb fact), and NIT 2 (the audit's At). Commit fea28f7.

What changed

  • MAJOR 1: GoldpathCampaignAdminService.ThrottleCeilingAsync.
    • When the target equals this process's code value, the guarded update now also sets SeedMaxTps to that value. The row then reads MaxTps == SeedMaxTps, so the leader follows the next release.
    • The guard now compares the seed it read, as well as MaxTps. A leader's follow always moves both together, so a lost race is still re-read, never overwritten blind.
    • Any other value keeps the seed, so the row stays moved.
    • XML doc, runbook item 15, docs/upgrades/0.1.0-preview.10.md and the CHANGELOG entry now state the hand-back as it behaves: "the value code seeds now, even if code changed while you held the row".
  • MINOR 1: GoldpathCampaignOptions.AddTargetSystem refuses a name containing /, with teaching text ("…it is a path segment of the ceiling route, which cannot carry one. Use '-', '.' or ':' instead."). The <exception> doc says so too. I chose a refusal at declaration, as you preferred.
    • AddTargetSystem is only in PublicAPI.Unshipped.txt, so no shipped train changes behaviour.
    • The upgrade guide and CHANGELOG mention the refusal.
  • MINOR 2: CampaignCeilingVerbTests keeps its 6 s and 8 s windows as minimums, so the before-window still spans a slice boundary. It then polls with UntilAsync, every 200 ms and bounded by the 3-minute token, until before ≥ SeedTps*2 and after ≥ LoweredTps*3. The strict per-second assertions are unchanged.
  • NIT 2: the ceiling audit row is stamped with now, the same instant as the row's UpdatedAt.
  • Not taken:

Evidence

Proof Result
SettingTheCodeValueBack_AfterCodeMoved_HandsTheRowBackToCode (theory: TargetSystem and Global; your P1 scenario 200 → 100 → release 300 → set 300 → release 400 ⇒ (400, 400, "system"), no Warning logged) green; RED with seed = readSeed (2 failed / 65)
SettingAValueOtherThanCode_KeepsTheSeed_AndTheRowStaysMoved (150 / 200 stays; audit At == UpdatedAt) green; RED with the audit stamped by _time.GetUtcNow() again
CampaignCeilingProof step 6 (new, PostgreSQL 17): hand-back with code moved 300 → 400 ⇒ (400, 400) green; RED with seed = readSeed: Expected (400, 400) Actual (400, 300)
CampaignCeilingOracleProof (same scenario including step 6, Oracle Free) green
ATargetSystemNameCannotCarryASlash (core/eu, /, core/) green; RED (3/3) with the check removed
ANameTheConsoleEscapes_StillReachesTheVerb_ThroughTheRoute (çekirdek İ a%b, Uri.EscapeDataString, over HTTP) green: 200, row at 9
CampaignCeilingVerbTests under load (8 busy loops on this 4-vCPU box, load average 10.6 → 13.8) 2/2 green (19 s, 17 s)
Goldpath.Campaign.Tests in full 542/542
dotnet build Goldpath.sln -c Release 0 warnings, 0 errors
Gates: docs-freshness, schema-honesty, skills-parity, template-pins, ledger-check rc 0 for all

Pre-PR self-check (the whole PR as it now stands)

  • Acceptance criteria of Campaign R3-S9 (R3.2b): ceiling verbs, audit and routes (admin-contract R4), S-FLEET-03 extended, the governor editor #318: all still met, as in your step 1. The hand-back promise that a criterion relies on now holds when code moves.
  • Ledgers/docs updated in this PR: CHANGELOG [Unreleased] (hand-back, audit stamp, / refusal), runbook item 15 and the upgrade guide.
    • No new deferred work, so no new open-threads row. NIT 1 stays as your review records it; if the owner wants it tracked, it becomes a T-row.
    • No GA gate status changes, and goldpath-ga-readiness.md is untouched.
  • XML docs:
    • The ThrottleCeilingAsync summary and the AddTargetSystem <exception> were edited in place.
    • The new tests sit after a closing brace, each with its own <summary>.
    • RowOf sits before Rows and has no doc.
    • UntilAsync sits before Query.
    • No /// block is split from its member.
  • Honesty: the runbook, upgrade guide, CHANGELOG and XML doc all say "the current code value", and that is what the code does: _options of the process running the verb.
  • Wired: the verb is exercised through the composed host by CampaignCeilingVerbTests (RabbitMQ + PostgreSQL), and the routes by the HTTP facts.
  • Contracts: no route, envelope or field change. PublicAPI.Unshipped.txt is unchanged (no signature change: AuditAsync is private).
  • Bench/long test: CampaignCeilingVerbTests stays in its quartz-process-globals collection, and now waits on its condition rather than the clock.
  • Deep self-review:
    • Security / input validation: / is refused at declaration, and the other escaped characters are proven to decode through the route.
    • Edge cases:
      • null seed: the guard is the same nullable-comparison translation as the MaxTps guard that step 5 proves with a NULL on PostgreSQL and Oracle;
      • hand-back on the global row, as a theory row;
      • a value other than code keeps the seed;
      • tr-TR: a dotted İ name passes through the route.
    • Concurrency: the update is guarded on both MaxTps and SeedMaxTps as read, and the leader's follow is guarded on both, so neither overwrites the other blind.
    • Migrations: none.
    • Performance: unchanged, one row.
    • Compatibility: the / refusal is on an unshipped API.
    • Code quality: follows the surrounding idioms; no suppression.

Not run here: the console smoke and axe. No UI file changed.


Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Verifier verdict (run 2026-11-14, daytime)

Head verified: fea28f707ec607d6f7dff24fb800efe44ab1f63b. Since my morning verdict (1ed9567) it adds one commit, fea28f7. Tier C (docs/rfc/**, docs/upgrades/**), so the owner merges it.

Verdict: changes requested. 0 BLOCKER, 1 MAJOR, 0 MINOR, 2 NIT.

The morning's findings are fixed and each one's red proof reproduces:

  • MAJOR 1: the hand-back after code moved.
  • MINOR 1: the / in a name.
  • MINOR 2: the load-sensitive fact, which now waits on samples.
  • NIT 2: the audit's At.

Mutation-testing the new seed rule found a sibling defect, though, and this one silently reverts an operator's value within one leader slice, with no deploy at all.

Finding

1. MAJOR: an operator value that equals the row's stale seed reads as "never moved", so the leader's next slice overwrites it with the code value.

  • Where: packages/Goldpath.Campaign/GoldpathCampaignAdminService.cs, var seed = target == code ? code : readSeed; (the guarded update in ThrottleCeilingAsync). It interacts with GoldpathCampaignEngine.cs:625–644, which skips when SeedMaxTps == code, warns and keeps when MaxTps != SeedMaxTps, and otherwise follows code.

  • Scenario (probe P1, a throwaway fact on the real fixture):

    1. Code seeds 200, and the operator sets 100, so the row is 100 / seed 200.
    2. A release seeds 300. The operator's 100 stands, and the seed stays 200.
    3. During an incident the operator raises the ceiling to 200, which is not code's 300. The verb keeps readSeed, so the row is 200 / seed 200, and that reads as "never moved".
    4. On the next leader slice of the same release, the engine sees MaxTps == SeedMaxTps != code and follows: the row becomes 300, UpdatedBy = "system".
    • Result: Expected (200, 200, "ops"), Actual (200, 300, "system").
    • No warning is logged. The audit row says the operator set 200, while the pacer binds 300.
  • Why it matters: this is a wrong result on the incident path the verb exists for. The operator's lowered or raised ceiling is replaced within a tick by a different number, with no signal. It contradicts the runbook's "the operator's value stands across deploys", and here it does not stand even without a deploy. It also contradicts the XML doc and the fix comment ("any other value keeps the seed, so the row stays moved"). The rule existed in 1ed9567 too, since the verb never touched the seed; I missed it this morning. The new seed handling makes it explicit.

  • Fix expected: always record the seed as the code value the verb ran against: var seed = code;. The insert path already does this. With that change:

    • "moved" means exactly MaxTps != code-at-the-time;
    • setting the code value hands the row back, as now;
    • any other value always stays moved and always produces the disagreement warning on the next release.

    I checked this in my sandbox. With seed = code, P1 goes green, and all 542 existing Goldpath.Campaign.Tests stay green, including both of your new hand-back facts and SettingAValueOtherThanCode_KeepsTheSeed_…, because code equals the old seed there.

    • Add P1 as a fact: 200 → 100 → release 300 → set 200 → reconcile the same release ⇒ 200 by ops, shown red on the current line.
    • Correct the XML doc and the fix comment, which say "a value other than code keeps the seed".
    • Also note the mutant below: with seed = code, the current suite cannot tell the two rules apart.

NITs (optional)

  1. Names . and .. cannot be reached through the route either (probe P3). Uri.EscapeDataString(".") is ., so the request path is dot-segment-normalised, and both answer 404. This is the same class as the / you now refuse. Consider refusing . and .. (or any name consisting only of dots) at AddTargetSystem, with the same teaching text. Such names are unrealistic, which is why this is a NIT.
  2. The new && c.SeedMaxTps == readSeed guard has no killing test. Dropping it leaves all 71 R3TargetSystemTests green (M2). Today it is close to equivalent, because the leader's follow always changes MaxTps too and the MaxTps guard catches that. Either pin it with an interceptor fact like AChangeThatLandsBetweenTheReadAndTheUpdate_…, with only the seed moving, or say in the comment that it is defence in depth.

Steps 1–6

# Step Result / evidence
1 Scope ✓ The delta touches 8 files: the service (seed and audit stamp), AddTargetSystem (the / refusal), runbook item 15, the upgrade guide, CHANGELOG, and three test files. No dependency, workflow, threshold or Stryker-config change. NIT 1 (two commits) was left with a reason, which I accept.
2 Rules ✓ The <summary> and <exception> docs are edited in place. No /// is split from its member. PublicAPI.Unshipped.txt is unchanged and correct: AuditAsync is private, and AddTargetSystem's signature is unchanged. CHANGELOG [Unreleased] and the upgrade guide are updated. No new T-number.
3 Confidentiality ✓ The denylist grep over the diff against main and over the commit messages: 0 hits.
4 Build ✓ dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
4 Tests ✓ Goldpath.Campaign.Tests 542/542. Integration, on local Docker: CampaignCeilingVerbTests, CampaignCeilingProof (PostgreSQL 17, including the new step 6) and CampaignCeilingOracleProof (Oracle Free): 3/3 in 57 s.
4 Red proofs ✓ M1 (seed = readSeed): SettingTheCodeValueBack_AfterCodeMoved_… red for both kinds. ✓ M3 (the / check removed): 3 red. ✓ M4 (audit stamped by _time again): SettingAValueOtherThanCode_… red. Restored: green, and the tree is clean.
4 Gates ✓ docs-freshness, ledger-check, schema-honesty, skills-parity, template-pins: rc 0 for all.
5 CI on fea28f7 ✓ All 24 checks green except merge-policy, which is red by design (Tier C without owner-approved).
6 Charter n.a.

Deep review (delta)

Dimension Result
a Security ✓ The / refusal keeps name and route one-to-one. The verb inputs are unchanged (bounded actor and detail, parameterised EF). NIT 1.
b Correctness & edge cases Finding 1. ✓ Global off by code, set to 700, then cleared, hands back as (null, null), and the next release's 500 is followed (P2). The nullable seed guard holds on PostgreSQL and Oracle (step 6 in both proofs).
c Concurrency ✓ The update is still guarded on what it read. NIT 2 notes that the seed half of the guard is unpinned.
d Data & migrations n.a. No schema change.
e Performance ✓ Unchanged.
f Compatibility ✓ The / refusal is on an unshipped API (PublicAPI.Unshipped.txt).
g Test quality Finding 1: M5 (seed = code unconditionally) survives every test, so the suite cannot tell the PR's rule from the correct one. M1, M3 and M4 are killed. The verb fact now waits on its condition, not the clock.
h Code quality ✓ Clear comments. UntilAsync is bounded by the test token.
i Observability Finding 1: a value reverted by the leader logs no warning, and the audit then disagrees with the row.
j Honesty Finding 1: "any other value keeps the seed, so the row stays moved" is untrue when the value equals the stale seed.

Edge-case probes (throwaway facts and mutants, removed; git status clean)

# Probe Result
P1 200 → op 100 → release 300 → op 200 → reconcile the same release FAIL: the row becomes 300 by system (finding 1). Green with seed = code.
P2 Global off by code → op 700 → op clear → release seeds 500 ✓ (null,null), then (500,500)
P3 Declared ., .. and a?b#c, POSTed through the route with Uri.EscapeDataString a?b#c ✓ 200. . and .. 404 (NIT 1)
M2 && c.SeedMaxTps == readSeed removed survives, 71/71 (NIT 2)
M5 seed = code unconditionally survives, 542/542; it is the fix for finding 1

Not run: a full mutation-gate.sh Goldpath.Campaign run, and the console smoke. No UI file changed in the delta.

Labels: changes-requested stays. Not agent-verified. Tier C: the owner merges after the fix.


Generated by Claude Code

… the seed, so an operator value equal to a stale seed is not reverted (R3-S9, #318)

Verifier findings on 2026-11-14 (daytime):

- MAJOR 1: the verb kept the stale seed for any value other than code,
  so an operator value that happened to equal it (200 -> 100, release
  300, operator sets 200) read as "never moved" and the leader's next
  slice of the same release replaced it with 300 by "system". The seed
  is now always the code value the verb ran against, as the insert path
  records it: the code value hands the row back, any other value stays
  moved. AnOperatorValueEqualToTheStaleSeed_StaysMoved_... (target
  system and global) is red on the previous rule; CampaignCeilingProof
  step 5 now expects (25, 400) on PostgreSQL and Oracle and is red on it.
  The seed half of the update's guard is dropped: the seed it read plays
  no part in what it writes, and the leader's follow always moves MaxTps.
- NIT 1: AddTargetSystem refuses a name made only of dots ('.', '..'),
  which the request path normalises away.

Runbook item 15, the preview.10 upgrade guide and the CHANGELOG say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AFdNbvMcH62PfA1a9ugqU
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Addressed verifier findings: MAJOR 1 (an operator value equal to the stale seed reverted by the leader), NIT 1 (./.. names), NIT 2 (the unpinned seed guard). Commit 9aa11d3.

What changed

  • MAJOR 1: ThrottleCeilingAsync now always writes SeedMaxTps = code, the code value the verb ran against. You proposed this fix, and the insert path already records the seed this way. With it, "moved" means exactly MaxTps != code-at-the-time:
    • setting the code value hands the row back to code;
    • any other value stays moved, including one equal to an older code value.
    • The XML doc, the code comment, runbook item 15, the upgrade guide and the CHANGELOG all state this rule. The runbook also says that a disagreeing release logs a warning.
    • SettingAValueOtherThanCode_KeepsTheSeed_… is renamed …_RecordsTheCodeSeed_…. Its assertions are unchanged, because code equals the old seed in that test.
  • NIT 2: the c.SeedMaxTps == readSeed half of the guard is dropped. I did not pin it, because under seed = code it cannot be pinned: the seed the verb read has no effect on what it writes. The leader's follow always moves MaxTps along with the seed, so the MaxTps guard is the one that catches that race. The code comment says so.
  • NIT 1: AddTargetSystem refuses a name made only of dots, with teaching text. core.eu is still accepted. The <exception> doc, the upgrade guide and the CHANGELOG say so.

Evidence

Proof Result
AnOperatorValueEqualToTheStaleSeed_StaysMoved_AndTheSameReleaseDoesNotRevertIt (theory: TargetSystem and Global). This is your P1: 200 → 100 → release 300 → op 200 → the same release's next slice ⇒ (200, 300, "ops"); the next release 400 ⇒ still 200 by ops, with a Warning logged green. RED on the previous rule (target == code ? code : row.SeedMaxTps): Expected (200, 300) Actual (200, 200), 2/2
CampaignCeilingProof step 5 (PostgreSQL 17). Its old (25, 300) assertion encoded the stale seed; it now expects (25, 400) green. RED on the previous rule: Expected (25, 400) Actual (25, 300)
CampaignCeilingOracleProof (Oracle Free) and CampaignCeilingVerbTests (RabbitMQ + PG) green, 3/3 in 37 s
ATargetSystemNameOfOnlyDots_IsRefused (., .., ...; core.eu accepted) green. RED (3/3) with the check removed
Goldpath.Campaign.Tests in full 547/547
dotnet build Goldpath.sln -c Release 0 warnings, 0 errors
dotnet format whitespace --verify-no-changes on the touched projects clean
Gates: docs-freshness, schema-honesty, skills-parity, template-pins rc 0
ledger-check rc 0, but it skipped: there is no authenticated gh here

Reproduce

git checkout agent/318-ceiling-verbs
dotnet test tests/Goldpath.Campaign.Tests -c Release --filter "FullyQualifiedName~AnOperatorValueEqualToTheStaleSeed|FullyQualifiedName~ATargetSystemNameOfOnlyDots"   # green
sed -i 's/\.SetProperty(c => c\.SeedMaxTps, code)$/.SetProperty(c => c.SeedMaxTps, target == code ? code : row.SeedMaxTps)/' packages/Goldpath.Campaign/GoldpathCampaignAdminService.cs
dotnet test tests/Goldpath.Campaign.Tests -c Release --filter "FullyQualifiedName~AnOperatorValueEqualToTheStaleSeed"   # red, 2
dotnet test tests/Goldpath.IntegrationTests -c Release --filter "FullyQualifiedName~CampaignCeilingProof"                # red: (25,400) vs (25,300)
git checkout -- packages/

Pre-PR self-check (this delta)

  • Every finding is addressed; none was skipped.
  • Ledgers: CHANGELOG [Unreleased], runbook 15 and the upgrade guide are updated. No new deferral, so no new T-row. goldpath-ga-readiness.md is untouched.
  • XML docs: the summary and <exception> were edited in place, and the new tests each carry their own <summary>, placed after a closing brace.
  • Honesty: every document states the rule the code implements.
  • Wired: the composed host (CampaignCeilingVerbTests) and the provider proofs are green.
  • Deep self-review:
    • Edge cases: a null code (the global row off) gives seed = null, so an operator value is moved and a clear is a hand-back, which is P2's case. Dot-only names are refused.
    • Concurrency: the MaxTps guard still re-reads a lost race.
    • Compatibility: the change is on an unshipped API only.
    • Migrations / performance: n/a.

Not run here: the console smoke and axe (no UI file changed), and a full mutation-gate.sh Goldpath.Campaign.


Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Verifier verdict (run 2026-11-16)

Head verified: 9aa11d32cd750592dcc9d5a0f98e5b1126dd629e. The branch contains main@58589e1. Since my last verdict (fea28f7) it adds one commit, 9aa11d3, touching 7 files. Tier C (docs/rfc/**, docs/upgrades/**), so the owner merges it.

Verdict: verified. 0 BLOCKER, 0 MAJOR, 0 MINOR, 0 NIT.

The 2026-11-14 daytime findings are fixed, and each red proof reproduces:

  • MAJOR 1 (an operator value equal to the stale seed was reverted by the leader): the verb now always records SeedMaxTps = code.
  • NIT 1 (names made only of dots): refused at declaration.
  • NIT 2 (the unpinned seed half of the guard): dropped, with the reason in the comment. I checked that reason against the engine: the leader's follow (GoldpathCampaignEngine.cs:641) only fires when MaxTps == SeedMaxTps and always moves MaxTps, so the MaxTps guard catches it. Probe P2 below confirms this.

The earlier rounds' findings remain fixed: the hand-back after code moved, the / refusal, the verb fact waiting on samples, and the audit stamped with now.

Steps 1–6

# Step Result / evidence
1 Scope ✓ The delta is: the seed rule plus the dropped guard in ThrottleCeilingAsync, the dot-only refusal in AddTargetSystem, wording in the XML doc, runbook 15, the upgrade guide and the CHANGELOG, one renamed fact plus two new ones, and one corrected assertion in CampaignCeilingProof step 5 ((25,300) → (25,400)). That correction is the intended behaviour change, not a weakened test. No dependency, workflow, threshold or Stryker-config change. Every #318 criterion is still met, as in the 11-14 morning table.
2 Rules / ledgers ✓ The <summary> and <exception> docs are edited in place, and no /// is split from its member. PublicAPI.Unshipped.txt needs no change, since no signature changed. CHANGELOG [Unreleased] and the upgrade guide state the new rule. No new T-number. A grep for stale wording ("keeps the seed", "seed is reset", readSeed) across the tree finds 0 hits.
3 Confidentiality ✓ The denylist grep over the full diff against main and over all 3 commit messages: 0 hits. No secrets or hostnames.
4 Build ✓ dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors. dotnet format whitespace --verify-no-changes on the touched projects: clean.
4 Tests ✓ Goldpath.Campaign.Tests 547/547. Integration on local Docker: CampaignCeilingProof (PostgreSQL 17), CampaignCeilingOracleProof (Oracle Free) and CampaignCeilingVerbTests (RabbitMQ + PG): 3/3 in 77 s.
4 Red proofs All restored afterwards; the worktree was clean.
✓ R1, the PR's own recipe (target == code ? code : row.SeedMaxTps): AnOperatorValueEqualToTheStaleSeed_… red for both kinds (2/76). CampaignCeilingProof and CampaignCeilingOracleProof are both red with Expected (25, 400) Actual (25, 300).
✓ R2, the dot check disabled: ATargetSystemNameOfOnlyDots_IsRefused red, 3/3.
✓ R3, seed = row.SeedMaxTps always: 4 red (both stale-seed facts and both hand-back-after-code-moved facts).
4 Repo gates ✓ docs-freshness, schema-honesty, skills-parity, template-pins and merge-tier.py selftest: rc 0. ledger-check rc 0, but its GitHub half was skipped (no authenticated gh in this sandbox).
5 CI on 9aa11d3 ✓ 24 of 25 checks are green: gates, integration, oracle, kit, all gm / *, golden manifests (PR subset), review, alert-rules, CodeQL (cs + js) and tier-label. merge-policy is red by design (Tier C without owner-approved).
6 Charter n.a.

Deep review (the delta, with the whole verb re-read)

Dimension Result
a Security ✓ The dot-only refusal closes the last route-unreachable name class. Probe P1 shows the other awkward names reach the verb. The inputs are otherwise unchanged: a bounded actor and detail, and parameterised EF.
b Correctness & edge cases ✓ "Moved" now means exactly MaxTps != code-at-the-time. The stale-seed case, the hand-back after code moved, and a lost race to the leader's follow all hold (P2, P3).
c Concurrency ✓ The update is guarded on the MaxTps it read. The leader's follow is guarded on both values and always moves MaxTps. A follow landing between the verb's read and its update is re-read, and the audit names the value it replaced (P2).
d Data & migrations n.a. No schema change.
e Performance ✓ Unchanged: one row.
f Compatibility ✓ The new refusal is on an unshipped API (PublicAPI.Unshipped.txt).
g Test quality ✓ R1–R3 are each killed by a named fact. Last round's surviving mutant (M5, seed = code) is now the code, and its alternative is killed.
h Code quality ✓ The comments explain why. No suppression, no dead code.
i Observability ✓ A release that disagrees with an operator's value logs the warning (asserted in the new fact and in P2).
j Honesty ✓ The XML doc, runbook 15, the upgrade guide and the CHANGELOG all state the rule the code implements.

Edge-case probes (throwaway facts, removed; nothing pushed)

# Probe Result
P1 Declared names a%2Fb, . , ., . (U+FF0E), %2E%2E and core., POSTed through the route with Uri.EscapeDataString ✓ 6/6 answer 200, and the row is set
P2 A leader follow (200 → 300 by system) lands between the verb's read and its update; the verb sets 120; then a release seeds 300 ✓ re-read; the audit says 300/s -> 120/s; the row stays 120 by ops; a warning is logged
P3 The stale-seed scenario under tr-TR with the name çekirdek-İı; then the case variant ÇEKİRDEK-İI ✓ (200, 300, "ops"); the case variant is refused (ordinal)
P4 Rolling deploy: a replica already on code 300 sets 150 while the old leader (code 200) still leads; then the new leader ✓ (150, 300, "ops") under the old leader and still 150 by ops under the new one. The value is never reverted.

Not run: a full mutation-gate.sh Goldpath.Campaign run, the console smoke and axe (no UI file changed since my first verdict), and the GitHub half of ledger-check.

Labels: changes-requested removed, agent-verified added. Tier C: never auto-merged. merge-policy stays red until the owner adds owner-approved. Last time's note on #575 still applies: whichever lands second merges the other in (RouteContractTests.cs).

Owner: safe to merge. Summary: operators can now change a target system's ceiling, or the global one, live from the admin API or the console governor, and every change is audited. The operator's value stands across deploys until they set it back to the code value, which hands it back to code.


Generated by Claude Code

@omercelikdev omercelikdev added agent-verified Independently verified by the verifier agent: ready for owner merge and removed changes-requested Verifier found problems; the worker fixes these first labels Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr PR opened by the overnight agent agent-verified Independently verified by the verifier agent: ready for owner merge tier:C ADR-0014 Tier C: decisions, releases, gates, policy, agent layer; the owner merges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Campaign R3-S9 (R3.2b): ceiling verbs, audit and routes (admin-contract R4), S-FLEET-03 extended, the governor editor

3 participants