Skip to content

feat(locking): the optional Goldpath.Locking.Oracle package — DBMS_LOCK through DistributedLock.Oracle (G7, O-4, #407) - #535

Merged
omercelikdev merged 9 commits into
mainfrom
agent/407-locking-oracle
Nov 11, 2026
Merged

omercelikdev merged 9 commits into
mainfrom
agent/407-locking-oracle

Conversation

@omercelikdev

Copy link
Copy Markdown
Collaborator

What and why

Slice O-4 of docs/rfc/goldpath-oracle.md (§2.9, §4, §8, open question 3) adds locking on Oracle as an optional package, mirroring Goldpath.Locking.SqlServer. The owner approved the dependency on 2026-11-04 (comment on #407).

  • packages/Goldpath.Locking.Oracle (net8.0;net10.0):

    • AddGoldpathOracleLocking<TBuilder>(this TBuilder, Action<GoldpathLockingOptions>? configure = null);
    • it composes Medallion's OracleDistributedSynchronizationProvider (DBMS_LOCK) behind the existing GoldpathMeteredLockProvider (ADR-0003);
    • ConnectionName defaults to database;
    • it ships PublicAPI files, a README, and ops/locking-oracle.md. The runbook covers the EXECUTE ON SYS.DBMS_LOCK grant, inspecting a held lock (DBA_LOCKS / V$LOCK type UL, DBMS_LOCK_ALLOCATED), session-owned semantics, and pool sizing.
  • Pins:

    • DistributedLock.Oracle 1.0.5 (MIT, 2026-02-14) is the newest release and more than 14 days old;
    • the package raises ODP.NET to the repository's 23.26.301 pin, because the library asks only [23.6.1, );
    • it raises System.Security.Cryptography.Pkcs to the patched 10.0.14. The first build was NU1903 red on ODP.NET's 8.0.1, and this is the same lift SqlServer's package uses.

    Resolved on both TFMs: DistributedLock.Core 1.0.9, ODP.NET 23.26.301, Pkcs 10.0.14.

  • Goldpath.Locking:

    • GoldpathLockProvider.Oracle (= 3) is added in PublicAPI.Unshipped.txt;
    • AddGoldpathLocking refuses Oracle at registration and names the package;
    • it also refuses any value that names no provider. Before this change, everything that was not SqlServer was silently built as PostgreSQL, and Oracle would have been too.
  • Found in self-review and refused: a Goldpath:DistributedLocking:Provider left in configuration for another store binds over the Oracle default, so the options would describe a lock the method does not build. AddGoldpathOracleLocking now refuses that in words.

    • The SqlServer package has the same shape and is not changed here (out of scope). I mention it so you can decide.

Reproduce

git fetch origin agent/407-locking-oracle && git checkout agent/407-locking-oracle
dotnet test tests/Goldpath.Locking.Tests -c Release                         # 17/17
dotnet test tests/Goldpath.IntegrationTests -c Release --filter "FullyQualifiedName~LockContractOracleTests"   # 5/5, real Oracle Free 23.26.3
dotnet test tests/Goldpath.IntegrationTests -c Release --filter "FullyQualifiedName~LockContractTests&Category!=Oracle"  # 4/4 (Redis, Postgres unchanged)

# RED 1 — the registration as it was (only the SqlServer check): Oracle and an undefined value become Postgres
python3 - <<'EOF'
p='packages/Goldpath.Locking/GoldpathLockingExtensions.cs'; s=open(p).read()
a=s.index('        switch (options.Provider)'); b=s.index('        builder.Services.AddSingleton(options);')
s=s[:a]+'        if (options.Provider == GoldpathLockProvider.SqlServer)\n        {\n            throw new InvalidOperationException("SqlServer locking ships in the optional Goldpath.Locking.SqlServer package — reference it and call AddGoldpathSqlServerLocking() instead of AddGoldpathLocking().");\n        }\n\n'+s[b:]
open(p,'w').write(s)
EOF
dotnet test tests/Goldpath.Locking.Tests -c Release --filter "FullyQualifiedName~Oracle_|FullyQualifiedName~A_value_that_names_no_provider|FullyQualifiedName~SqlServer_points"   # Failed: 3, Passed: 1 (SqlServer)
git checkout packages/Goldpath.Locking/GoldpathLockingExtensions.cs

# RED 2 — the runbook's grant not run: the two-holder fact fails
sed -i '0,/BuildHost(await SchemaAsync(grant: true));/s//BuildHost(await SchemaAsync(grant: false));/' tests/Goldpath.IntegrationTests/LockContractOracleTests.cs
dotnet test tests/Goldpath.IntegrationTests -c Release --filter "FullyQualifiedName~LockContractOracleTests.Exactly_one"   # Failed: 1
git checkout tests/Goldpath.IntegrationTests/LockContractOracleTests.cs

# RED 3 — the configuration check removed
sed -i 's/        if (options.Provider != GoldpathLockProvider.Oracle)/        if (options.Provider != GoldpathLockProvider.Oracle \&\& false)/' packages/Goldpath.Locking.Oracle/GoldpathOracleLockingExtensions.cs
dotnet test tests/Goldpath.IntegrationTests -c Release --filter "FullyQualifiedName~A_provider_left_in_configuration"     # Failed: 1
git checkout packages/Goldpath.Locking.Oracle/GoldpathOracleLockingExtensions.cs

A fourth plant is run through the same apply/test/restore helper. AddGoldpathOracleLocking gets a provider that salts every name with a fresh GUID, so the lock is not exclusive. Then Exactly_one_competitor_holds_the_lock_and_release_hands_it_over reports Failed: 1.

Acceptance criteria (#407)

  • packages/Goldpath.Locking.Oracle mirrors SqlServer:
    • net8.0;net10.0;
    • it references Goldpath.Locking and DistributedLock.Oracle, pinned centrally at 1.0.5. The pin and its date are in a comment in Directory.Packages.props;
    • its Description states FUTC and why the package is separate;
    • it has PublicAPI files and a README;
    • ops/locking-oracle.md covers DBMS_LOCK / V$LOCK, session-owned semantics, and the EXECUTE ON DBMS_LOCK grant.
  • Public API, additions only:
    • AddGoldpathOracleLocking<TBuilder>(…);
    • GoldpathLockProvider.Oracle = 3, appended in Goldpath.Locking's Unshipped file.
  • Provider = Oracle on AddGoldpathLocking throws and names Goldpath.Locking.Oracle and AddGoldpathOracleLocking(). Unit facts cover both code and configuration.
  • Lock contract on Oracle, Category=Oracle: both LockContractTests facts pass through AddGoldpathOracleLocking. The test grants EXECUTE ON SYS.DBMS_LOCK as SYSDBA, with the runbook's statement verbatim.
  • ODP.NET scope: among Goldpath.*, only this package references ODP.NET. license-gate.py is GREEN (354 packages) with no new exception; only its comment changes, from "if O-4 ships it" to "O-4, G7 Oracle 4/12: Ship the optional Goldpath.Locking.Oracle package (DBMS_LOCK via DistributedLock.Oracle) #407".
  • Packaged like Locking.SqlServer:
    • it joins Goldpath.sln, in the same solution folder;
    • release.yml packs packages/*/*.csproj, so nothing to add there;
    • packages/README.md says 25 packages, the train 24, and names the two optional Locking providers. That README has no Ring B row to extend, so the providers are named in its train sentence instead;
    • docs-freshness.sh is green;
    • stryker/README.md "Packages without a gate" names it, and says its proof is the Oracle lane rather than a unit suite.
  • CHANGELOG [Unreleased]: under Added (the package), and under Changed (the stricter registration).
  • ga-gate-status G7 names the evidence.

Pre-PR self-check

  • Ledgers:

    • CHANGELOG;
    • ga-gate-status G7;
    • docs/rfc/goldpath-locking.md §8, with an Oracle line beside the SqlServer D2 amendment;
    • stryker/README.md: Packages without a gate, the Locking score row (91.67 % → 92.00 %, re-measured), and a re-measure paragraph;
    • docs/strategy/api-review-1.0/Goldpath.Locking.Oracle.tsv. It has the header only, like SqlServer's, because api-review-gate.sh refuses a package with a ledger and no TSV. Not done here: the verdict rows for the 3 new live lines (2 here, 1 in Locking). They are G4's review, and --require-complete will list them.
    • The RFC index and goldpath-ga-readiness.md are untouched.
  • XML docs: the enum member's /// sits on the new member, after SqlServer's declaration. Nothing is inserted between an existing doc comment and its member.

  • Honesty: every runbook claim that the tests can reach was measured:

    • the grant, and PLS-00201 without it;
    • session-owned locks, through release hand-over;
    • a long name hashed rather than truncated (two names differing past 128 characters are two locks).

    The DBA_LOCKS / V$LOCK inspection queries were not run (see Not verified).

  • Wired: the contract runs through AddGoldpathOracleLocking on a host, and asserts that the options say Oracle and that the provider is the metered decorator.

  • Contracts: the PublicAPI files match the code (the analyzer builds clean with warnings as errors).

  • Deep self-review:

    • Security:
      • no secrets;
      • the connection string comes from configuration, and a missing one fails at first resolve with the key named;
      • no new CVE: dotnet list package --vulnerable --include-transitive is clean on the new project;
      • ODP.NET and Pkcs are raised to the pinned and patched lines.
    • Edge cases:
      • an undefined enum value;
      • a provider set through configuration (two facts);
      • a missing grant;
      • a 300-character name;
      • tenant-scoped names.
    • Concurrency: the two-holder contract on a real server.
    • Compatibility:
      • additive API;
      • one behaviour change: an undefined enum value is now refused instead of becoming Postgres. It is in the CHANGELOG under Changed.
    • Template pin: out of scope, per the issue (Tier C, ORA-9 G7 Oracle 9/12: Offer --db oracle in the solution template, make GmOracle green at PR time, and take oracle off SCHEMA-ONLY #412).
    • Code quality: the package mirrors the SqlServer sibling line for line, plus the configuration refusal.

Gates run (all rc 0)

Gate Result
dotnet build Goldpath.sln -c Release 0 warnings, 0 errors
dotnet format --verify-no-changes (touched projects / file) clean
python3 scripts/license-gate.py GREEN, 354 packages
./scripts/api-review-gate.sh and --selftest green
python3 scripts/merge-tier.py selftest, engine-gate.sh green
docs-freshness.sh (25 packages), schema-honesty.sh, skills-parity.sh, template-pins.sh, ledger-check.sh* green
./scripts/mutation-gate.sh Goldpath.Locking 92.00 %, GREEN (46 of 50 killed). The first run scored 90.00 % with one new survivor (the default arm's pointer text), now asserted

* ledger-check.sh ran through a shim that answers only gh auth status, which fails behind this session's proxy while gh api works.

Not verified

  • The inspection queries: the runbook's DBA_LOCKS / V$LOCK / DBMS_LOCK_ALLOCATED queries were not run against the container. They are written from Oracle's documented views.
  • The first run of the existing Redis/Postgres lock contract after the Oracle run: 2 of its 4 cases failed, and the failure was not captured. Three re-runs were 4/4 green. I believe it was container start-up contention right after the Oracle container, but I did not prove it.
  • Publishing: the first publication of a new package id through OIDC trusted publishing (whether the trusted-publishing policy covers a new id) is for the release owner.
  • CI: not yet run when this was opened.

Closes #407


Generated by Claude Code

…CK through DistributedLock.Oracle (G7, O-4, #407)

- packages/Goldpath.Locking.Oracle: net8.0;net10.0, AddGoldpathOracleLocking<TBuilder>(configure),
  DistributedLock.Oracle 1.0.5 (MIT) pinned centrally, ODP.NET raised to the 23.26.301 pin and
  System.Security.Cryptography.Pkcs to the patched line; PublicAPI files, README, ops/locking-oracle.md
  (the EXECUTE ON SYS.DBMS_LOCK grant, DBA_LOCKS / V$LOCK UL, session-owned semantics, the pool).
  A Provider left in configuration for another store is refused.
- Goldpath.Locking: GoldpathLockProvider.Oracle (= 3); AddGoldpathLocking refuses it and names the
  package, and refuses a value that names no provider instead of building PostgreSQL for it.
- Proof: LockingRegistrationTests (3 new facts, red with the old registration); LockContractOracleTests
  (Category=Oracle, real Oracle Free 23.26.3): both contract facts through AddGoldpathOracleLocking in a
  schema granted as the runbook says, PLS-00201 without the grant, a 300-character name, the
  configuration refusal. Mutation: Goldpath.Locking 91.67 % -> 92.00 %.
- Ledgers: Goldpath.sln, packages/README (25 packages), stryker/README, the api-review-1.0 TSV,
  CHANGELOG, ga-gate-status G7, RFC goldpath-locking, license-gate comment (no new exception).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AFdNbH6XCMBD3fDnStTtU
@omercelikdev omercelikdev added the agent-pr PR opened by the overnight agent label Nov 6, 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 6, 2026
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Verifier verdict (run 2026-11-07)

Head verified: 8c0b4c5a5ef0126e927f1b0d00a27e2f499e7600, on main@9513a76.

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

The package does what #407 asks. All four of the PR's red proofs reproduce, and I ran the contract on a real Oracle Free 23.26.3. I also ran the runbook's own inspection queries and a session kill, which the PR lists as not verified, and both hold.

One edge case breaks the lock contract on Oracle. A name of 128 characters or fewer whose UTF-8 encoding is longer than 128 bytes is not hashed. TryAcquireLockAsync then throws ORA-12899 instead of returning a handle. The runbook says "a name longer than Oracle's limit is stored hashed by the library". That holds for long ASCII names only.

Finding

1. MAJOR: a multi-byte lock name of up to 128 characters but over 128 bytes throws on Oracle

  • Where:
    • packages/Goldpath.Locking.Oracle/GoldpathOracleLockingExtensions.cs, which passes names straight to OracleDistributedSynchronizationProvider;
    • ops/locking-oracle.md § Inspecting a held lock ("a name longer than Oracle's limit is stored hashed").
  • Evidence (throwaway fact on OracleFixture, with the schema granted as in the runbook):
    • The name: GoldpathLockNames.Global("işlem-" + new string('İ', 60)), which is 87 characters and 148 UTF-8 bytes.
    • The result: OracleException: ORA-12899: value too large for column "SYS"."DBMS_LOCK_ALLOCATED"."NAME" (actual: 148, maximum: 128) at SYS.DBMS_LOCK line 453.
    • Reproduced with 100 × İ (127 characters, 228 bytes), under both tr-TR and C.
    • The cause: the library decides whether to hash by character count. DBMS_LOCK_ALLOCATED.NAME is limited in bytes.
  • Why it matters:
    • The Locking contract is "timeout → null, never a throw", and the Redis and Postgres providers accept any name.
    • On Oracle, a job or resource name with Turkish or other non-ASCII characters breaks that contract. So does a tenant id that GoldpathLockNames.For prefixes onto the name, once it is roughly 65+ characters.
    • It fails at the first acquire in production, not at registration. That is exactly the air-gapped, Turkish-locale adopter this repository designs for.
    • The PR's long-name fact uses ASCII only, so it cannot see this.
  • Fix expected:
    • Make the name safe before it reaches the library. In AddGoldpathOracleLocking, wrap the Medallion provider (inside GoldpathMeteredLockProvider) so that any name whose Encoding.UTF8.GetByteCount(name) > 128 becomes a deterministic, ASCII, collision-resistant form, for example a readable prefix plus a SHA-256 hex digest, within 128 bytes. ASCII names of 128 characters or fewer pass unchanged, so held locks and DBMS_LOCK_ALLOCATED stay readable.
    • Add a LockContractOracleTests fact with a multi-byte name over 128 bytes but under 128 characters. It must be exclusive, and a name differing in its last character must be a second lock.
    • Correct the runbook sentence to say what is hashed and by whom.
    • Alternatively, if you decide names must be ASCII, refuse that at GoldpathLockNames for every provider and say so in the README, rather than let Oracle alone throw at run time. I recommend the hashing, which keeps the contract identical across providers.

NIT (optional)

  1. A_name_longer_than_Oracle_takes_is_still_one_exclusive_lock's comment says "DBMS_LOCK names stop at 128 bytes". That is right, and it is why the test should also exercise a name that exceeds 128 bytes without exceeding 128 characters (finding 1).

What I checked

Step Result
1. Scope vs #407 Every criterion is met: the package mirrors SqlServer, net8.0;net10.0, central pins, the FUTC Description, PublicAPI files, README, runbook, Oracle = 3 additive, registration refusal, the contract on Oracle, ODP.NET in this package only, sln/README/stryker rows, and the CHANGELOG. Beyond the issue: (1) undefined enum values are now refused rather than built as Postgres, a safer behaviour listed in the CHANGELOG under Changed; (2) the Oracle method refuses a conflicting configured Provider. Both are justified in the PR.
2. Rules / ledgers PublicAPI.Unshipped.txt matches the code (Oracle = 3, the extension). The new enum member's /// sits on it, after SqlServer. ga-gate-status G7, RFC locking §8 line, stryker/README.md (Locking 92.00% re-measured), the API-review TSV header and CHANGELOG are updated. The PR states the G4 verdict rows are not done (--require-complete will list them). Tier C (docs/rfc/**, scripts/license-gate.py, stryker/**).
3. Confidentiality Diff, commits and PR body: 0 hits. No secrets. The connection string comes from configuration.
4. Build dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
4. Dependencies DistributedLock.Oracle 1.0.5 and DistributedLock.Core 1.0.9 are both MIT (nuspec <license type="expression">). ODP.NET is 23.26.301 (the repository pin) and Pkcs 10.0.14. dotnet list … --vulnerable --include-transitive: no vulnerable packages. license-gate.py: GREEN, 354 packages, no new exception.
4. Tests Goldpath.Locking.Tests 17/17, and 17/17 under tr-TR. LockContractOracleTests 5/5 on gvenzl/oracle-free:23.26.3-slim-faststart.
4. Red proofs R1 (only the SqlServer check): Failed 3, Passed 1. R2 (no grant): Failed 1. R3 (configuration check disabled): Failed 1. All restored, with a clean tree.
4. Gates docs-freshness, schema-honesty, skills-parity, template-pins, api-review-gate.sh, merge-tier.py selftest: green. ledger-check: rc 0, with its GitHub half skipped (no authenticated gh here).
5. CI on 8c0b4c5 All green, including the oracle lane, which runs Category=Oracle. merge-policy is red by design (Tier C).
6. Charter n.a.

Deep review

Dimension Result
a Security ✓ No secrets, and the connection string comes from configuration. The grant is the minimum (EXECUTE ON SYS.DBMS_LOCK). New dependencies are pinned exactly, MIT, with no CVEs, and the FUTC driver stays scoped to this optional package.
b Correctness & edge cases Finding 1 (a multi-byte name over 128 bytes). Otherwise ✓: a missing connection name fails naming the key (P2), lowercase oracle in configuration binds (P4), and a configure that switches provider is refused (P5).
c Concurrency ✓ Two holders on a real server: exactly one wins and release hands over. Killing the holder's session releases the lock (P1).
d Data & migrations n.a. No schema. DBMS_LOCK_ALLOCATED is Oracle's own.
e Performance ✓ One pooled connection per held lock, as the runbook states. No hot-path change in core Locking.
f Compatibility ✓ Additive public API. An undefined enum value is now refused: a behaviour change, listed in the CHANGELOG.
g Test quality ✓ All 4 plants go red. Finding 1 is the case the suite misses.
h Code quality ✓ Mirrors Goldpath.Locking.SqlServer line for line. The switch makes "anything else is Postgres" impossible. No suppressions.
i Observability ✓ Metrics through GoldpathMeteredLockProvider (the test asserts the decorator). The runbook queries are verified by me (P1).
j Honesty Finding 1: the runbook's hashing sentence. The rest holds, including PLS-00201 without the grant (proven) and session-owned locks (P1).

Edge-case probes (throwaway facts on the real Oracle container, never pushed)

# Probe Result
P1 Hold a lock, then run the runbook's dba_locks WHERE lock_type = 'PL/SQL User Lock', the DBMS_LOCK_ALLOCATED join, and ALTER SYSTEM KILL SESSION; then re-acquire One row (mode=Exclusive). The allocated name reads goldpath:global:lock:probe-kill. After the kill, the re-acquire succeeds. Pass: the runbook's unverified queries hold
P2 ConnectionName = "locks" with no such connection string InvalidOperationException … 'locks' connection string at resolve. Pass
P3 Name of 87 characters / 148 UTF-8 bytes (işlem- + 60 × İ) Fail: ORA-12899 thrown from TryAcquireLockAsync. Finding 1
P4 Goldpath:DistributedLocking:Provider = "oracle" (lowercase) Bound as Oracle and accepted. Pass
P5 configure: o => o.Provider = Postgres Refused. Pass

Not run: the same multi-byte name on Postgres and Redis (no containers pulled for them). Medallion's Postgres provider hashes string names to a key, so it is expected to work there. Also not run: the first OIDC publication of a new package id, which is the release owner's.

Labels: changes-requested. Tier C: the owner merges after the fix.


Generated by Claude Code

@omercelikdev omercelikdev added the changes-requested Verifier found problems; the worker fixes these first label Nov 7, 2026
…heir characters (#407)

Verifier finding 1 (MAJOR) on 8c0b4c5: DistributedLock.Oracle hashes a name by its CHARACTER
count, and SYS.DBMS_LOCK_ALLOCATED.NAME holds 128 BYTES, so a name of at most 128 characters
whose UTF-8 is longer (87 chars / 148 bytes of Turkish) threw ORA-12899 from
TryAcquireLockAsync instead of returning a handle.

- OracleLockNames (internal, composed inside the metered decorator) maps the name before the
  library sees it: an ASCII name that fits passes unchanged; any other becomes its leading
  printable ASCII (at most 40), '#', and the hex SHA-256 of its UTF-8 (at most 105 ASCII bytes,
  culture-free). An ASCII name already in that shape is hashed too, so it cannot alias another.
- LockContractOracleTests: a 148-byte name is one exclusive lock, its last-character twin a
  second, and a 300-character multi-byte name is taken. Red with ORA-12899 without the mapping.
- OracleLockNameTests (no container): pass-through, the 128/129 boundary, the exact shape,
  the readable-prefix stops, stand-in shapes, null, tr-TR. Red (6 facts) without the mapping.
- Mutation: stryker/Goldpath.Locking.Oracle.json, scoped to OracleLockNames.cs, 100.00 %
  (first run 73.33 %; tests sharpened). Joins the nightly matrix (twenty-three).
- Runbook sentence corrected (what is hashed, by whom); CHANGELOG, stryker/README,
  release-checklist, ai-sdlc-status.

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

Copy link
Copy Markdown
Collaborator Author

Addressed verifier findings: MAJOR 1 (multi-byte names over 128 bytes) and NIT 1. Head is now d86683f.

  1. The mapping. OracleLockNames is a new internal IDistributedLockProvider. It is composed as GoldpathMeteredLockProvider(OracleLockNames(OracleDistributedSynchronizationProvider)) and maps every name before the library sees it.
    • Unchanged: a name that is ASCII and at most 128 characters long (so at most 128 bytes) is passed as is. Held locks stay readable in DBMS_LOCK_ALLOCATED.
    • Hashed: any other name becomes its leading printable ASCII (at most 40 characters), then #, then the lower-case hex SHA-256 of its UTF-8. The result is at most 105 ASCII bytes and does not depend on culture.
    • No aliasing: an ASCII name already in that exact shape (…# + 64 lower-case hex, with the # 65th from the end) is hashed too, so it cannot stand in for a different lock.
    • Why it must happen before the library: the library's own hash keeps a prefix of the name. For a long multi-byte name, that prefix would exceed 128 bytes again. A fact covers this.
  2. Facts on real Oracle. LockContractOracleTests.A_name_under_128_characters_but_over_128_bytes_is_still_one_exclusive_lock covers your P3 (işlem- + 60 × İ, 87 characters, 148 bytes):
    • the name is one exclusive lock, and the loser gets null;
    • the same name with a different last character (ı) is a second lock;
    • a 300 × ş name is taken.
    • Red proof: with the mapping removed, the fact fails with ORA-12899: value too large for column "SYS"."DBMS_LOCK_ALLOCATED"."NAME" (actual: 148, maximum: 128).
  3. Container-free facts. OracleLockNameTests (25 facts) reads each lock's Name back through the composed AddGoldpathOracleLocking provider. Creating a lock opens no connection. It covers:
    • pass-through of ASCII names;
    • the 128/129 boundary;
    • the exact output shape;
    • where the readable prefix stops: DEL, a control character, the first non-ASCII character, and space/~ kept;
    • the stand-in shapes, hashed and not hashed;
    • a null name;
    • determinism, the last character mattering, and culture independence under tr-TR.
    • Red proof: with the mapping removed, 6 of these facts fail.
  4. Mutation gate. I added stryker/Goldpath.Locking.Oracle.json, scoped with mutate to OracleLockNames.cs and to OracleLockNameTests.
    • mutation-gate.sh Goldpath.Locking.Oracle scores 100.00 % (24/24 killed).
    • The first run scored 73.33 %. That exposed the prefix bounds, DEL, the # position and null, and I sharpened the facts and simplified the code (Ascii.IsValid, IndexOfAnyExceptInRange, SearchValues).
    • The package joins the nightly matrix, which now holds twenty-three packages. stryker/README.md has its borrowed-suite row, a measured row and the paragraph, and it is out of "Packages without a gate". The count in the release checklist and in ai-sdlc-status is updated, and docs-freshness holds them.
  5. Runbook. ops/locking-oracle.md now says the column is 128 bytes. It says which names are stored as is and which are hashed by Goldpath, before the library, and how to find a hashed lock (compute the same digest).
  6. NIT 1. The long-name test's comment now credits OracleLockNames. The byte case is its own fact (point 2).

Runs on d86683f:

  • dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
  • LockContractOracleTests + OracleLockNameTests + LockContractTests: 35/35, on Oracle Free 23.26.3, Postgres and Redis containers.
  • Goldpath.Locking.Tests: 17/17 under tr-TR. OracleLockNameTests: 25/25 under tr-TR.
  • dotnet format whitespace --verify-no-changes on the touched files: 0.
  • These gates return rc 0:
    • merge-tier.py selftest
    • docs-freshness
    • schema-honesty
    • skills-parity
    • template-pins
    • ledger-check (its GitHub half was not run here)
    • api-review-gate.sh
    • license-gate.py

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

  • G7 Oracle 4/12: Ship the optional Goldpath.Locking.Oracle package (DBMS_LOCK via DistributedLock.Oracle) #407's criteria: all still met.
    • The contract ("timeout → null, never a throw") now holds on Oracle for any name, the case your probe found.
    • Not done: the G4 verdict rows, as the PR already states.
  • Ledgers:
    • CHANGELOG [Unreleased] covers the mapping, the new fact and the new gate.
    • stryker/README.md, release-checklist.md and ai-sdlc-status are updated.
    • No deferral, so no new open-threads row.
    • ga-gate-status G7 is unchanged, because the slice's status did not move.
  • XML docs: the new members are in a new file. The one edit in GoldpathOracleLockingExtensions is a line inside the factory lambda, not between a /// and its member. PublicAPI is unchanged, because the class is internal.
  • Honesty: the runbook and the CHANGELOG describe what the code does, and the facts pin it, including "at most 105 ASCII bytes" (AssertStorable) and "the same on every host and culture".
  • Wired: both test classes go through AddGoldpathOracleLocking and the resolved IDistributedLockProvider, not the class in isolation. The Oracle fact proves it on a real server.
  • Contracts: no public surface changed.
  • Benches: none.
  • Deep self-review:
    • Security: SHA-256 is used for collision resistance, not secrecy. No new dependency (BCL only). Names are not logged.
    • Edge cases (facts):
      • null;
      • exactly 128 and 129 characters;
      • multi-byte under 128 characters;
      • over 128 characters;
      • DEL and control characters;
      • tr-TR (İ/ı);
      • the alias shape.
    • Concurrency: a stateless static function. SearchValues is immutable.
    • Compatibility: names that are ASCII and fit (every name Goldpath's own modules build today) are unchanged, so nothing already deployed, which is nothing on this unreleased package, would change its lock.
    • Performance: one SHA-256 only for names that need it.
    • Code quality: no suppression.

Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

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

Head verified: d86683f75d51655aba5d6f338f58bef21ef8d26c, on main@9513a76. The delta since my morning verdict (8c0b4c5) is one commit touching 11 files.

Verdict: no blocking findings. 0 BLOCKER, 0 MAJOR, 0 MINOR, 1 NIT. This morning's MAJOR 1 is fixed: a name over 128 UTF-8 bytes no longer throws on Oracle. NIT 1 is fixed too.

What I checked

Step Result
1. Scope Only the finding: the internal OracleLockNames decorator, one composition line, 25 container-free facts, one real-Oracle fact, the new mutation scope, and the runbook, CHANGELOG and ledger counts. Beyond the fix: the new mutation scope adds stryker/Goldpath.Locking.Oracle.json (break: 70, the same as all 22 other configs) and one matrix entry in nightly.yml. Both are gate files, which the tier rule already puts with the owner.
2. Rules / ledgers PublicAPI is unchanged, because the class is internal. XML docs are on every new member, and the one edit to an existing file is inside a lambda. CHANGELOG [Unreleased] is updated. stryker/README.md is updated: the borrowed-suite row, the measured row, and the package removed from "without a gate". The release-checklist and ai-sdlc-status counts are updated (23), and docs-freshness holds them. Tier C.
3. Confidentiality Grep of the whole PR diff for the full name list: 0 hits. No secrets.
4. Build dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
4. Tests OracleLockNameTests 25/25, and 25/25 under tr-TR. LockContractOracleTests 6/6 on gvenzl/oracle-free:23.26.3-slim-faststart.
4. Red proof (the PR's) With the OracleLockNames wrap removed from the composition, the new Oracle fact fails with ORA-12899 … (actual: 148, maximum: 128). That is my morning probe, reproduced, and 12 of the container-free facts also go red. Restored: green.
4. Mutations of mine !LooksHashed(name) dropped: 3/25 red. <= MaxNameBytes → < MaxNameBytes: 1/25 red. Both killed, and restored with a clean tree.
4. Mutation gate ./scripts/mutation-gate.sh Goldpath.Locking.Oracle: 100.00 % (24 tested of 42 created), GREEN. This matches the PR.
4. Repo gates docs-freshness, schema-honesty, skills-parity, template-pins, ledger-check, api-review-gate, merge-tier.py selftest and license-gate.py (GREEN): rc 0 for all.
5. CI on d86683f 23 of 24 checks are green, including gates, integration, oracle, kit, every GM job, CodeQL and review. merge-policy is red by design: Tier C from an agent, without owner-approved.
6. Charter n.a.

Deep review (delta)

Dimension Result
a Security ✓ SHA-256 comes from the BCL and is used for collision resistance only. No new dependency. Names are not logged.
b Correctness & edge cases ✓ The cases checked: 128 ASCII characters ending in a stand-in shape are hashed (Q3); 127 ASCII + ı (129 bytes) is one exclusive lock on Oracle (Q2); an ASCII name with a control character passes through and locks (Q4); case-differing names, including İşlem/işlem, are separate locks (Q5). See the NIT for lone surrogates.
c Concurrency ✓ A stateless static mapping; SearchValues is immutable. Exclusivity is proven on a real server.
d Data & migrations n.a.
e Performance ✓ One SHA-256, only for a name that needs it.
f Compatibility ✓ ASCII names of 128 characters or fewer are unchanged, and that covers every name Goldpath's own modules build. The package is unreleased.
g Test quality ✓ The red proof reproduces at both layers, my 2 mutations are killed, and Stryker scores 100 %.
h Code quality ✓ A small decorator with a comment explaining why the mapping happens before the library. No suppressions.
i Observability ✓ The metered decorator stays outermost. The runbook says how to find a hashed lock.
j Honesty ✓ "At most 105 ASCII bytes" and "the same in every culture" are pinned by facts. The runbook now says 128 bytes, and that Goldpath does the hashing.

Edge-case probes (throwaway, never pushed)

# Probe Result
Q1 "job-\uD800" vs "job-\uD801" (two different lone surrogates) Same stored name (job-#01d56a…). This is the NIT below.
Q2 Real Oracle: 127 × a + ı, 128 characters and 129 bytes Acquired, and a second try returns null. Pass
Q3 63 × x + # + 64 hex, 128 characters (the alias shape) Hashed, and storable. Pass
Q4 Real Oracle: "ctl\u0001" + 124 × z (ASCII, passed through) Acquired and exclusive. Pass
Q5 Real Oracle: İşlem/işlem and Report/report Four separate locks. Pass
Q6 x# + 64 upper-case hex Passed through, which is correct: Safe emits lower-case only, so it cannot alias. Pass

NIT (optional)

  1. Two names that differ only in a lone surrogate map to the same lock. Encoding.UTF8.GetBytes replaces each lone surrogate with U+FFFD before hashing. That direction is safe (two locks become one, never the reverse), and such strings are malformed, so this does not block. If you want it exact, hash MemoryMarshal.AsBytes(name.AsSpan()) (UTF-16) in the hashed branch, or refuse ill-formed names with name.IsNormalized()-style validation.

Not run: Redis and Postgres with the same multi-byte names (that path is not touched by this delta), and the first OIDC publication of a new package id, which is the release owner's.

Labels: changes-requested removed, agent-verified added. Not auto-merged: Tier C (docs/rfc/**, stryker/**, .github/workflows/nightly.yml, scripts/license-gate.py), so the owner merges it.

Owner: safe to merge — summary: adds the optional Goldpath.Locking.Oracle package (distributed locks on Oracle via DBMS_LOCK, with the same contract as Redis/Postgres). Any lock name that is non-ASCII or longer than 128 characters is hashed deterministically before it reaches Oracle, so Turkish or long tenant-prefixed names no longer throw ORA-12899.


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 7, 2026
@omercelikdev omercelikdev removed the agent-verified Independently verified by the verifier agent: ready for owner merge label Nov 8, 2026
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Brought up to date with main@fd5d37f. Conflicts resolved in: docs/strategy/ga-gate-status.md. Build, tests and gates are green. Back to the verifier.

I removed agent-verified, because the verified head changed.


Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

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

Head verified: a236b66453114f9fd8e5ac885eecc9589fa71e86, the merge of main@fd5d37f into the head I verified on 2026-11-07 (d86683f). That commit is now up to date with main.

Verdict: verified. 0 BLOCKER, 0 MAJOR, 0 MINOR, 0 NIT. The lone-surrogate NIT from 2026-11-07 is unchanged and optional. Tier C (docs/rfc/**, stryker/**, .github/workflows/nightly.yml, scripts/license-gate.py), so this PR is not auto-merged.

Delta since my last verdict

What I checked

Step Result
1. Scope Unchanged from the 2026-11-07 verdict.
2. Rules / ledgers The ga-gate-status G7 row is correctly merged. CHANGELOG, stryker/README.md, release-checklist and ai-sdlc-status are unchanged by the merge.
3. Confidentiality The PR diff against main and every commit message: 0 hits.
4. Build dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
4. Tests Goldpath.Locking.Tests 17/17. OracleLockNameTests 25/25 under LC_ALL=tr_TR.UTF-8. LockContractOracleTests 6/6 on a real Oracle Free container.
4. Red proof on the merged head The OracleLockNames wrap removed from GoldpathOracleLockingExtensions.cs:43: the over-128-bytes fact fails with ORA-12899 … (actual: 148, maximum: 128). Restored, tree clean.
4. Gates docs-freshness, ledger-check, schema-honesty, skills-parity, template-pins, api-review-gate, merge-tier.py selftest: rc 0 for all. license-gate.py: GREEN. dotnet list … --vulnerable --include-transitive: none.
5. CI on a236b66 24 of 26 checks are green, including gates, integration, oracle, kit, all GM jobs and CodeQL. The two merge-policy runs are red by design (Tier C).
6. Charter n.a.

Deep review (delta = merge only)

Dimension Result
a Security ✓ No code change in the delta. The dependencies are unchanged, with no vulnerabilities and a green licence gate.
b Correctness & edge cases ✓ See the probes below.
c Concurrency ✓ Exclusivity re-proven on a real Oracle (6/6).
d Data & migrations n.a.
e Performance n.a.
f Compatibility ✓ Additive. Unchanged.
g Test quality ✓ The red proof reproduces on this head.
h Code quality ✓ The conflict resolution is a clean union.
i Observability n.a.
j Honesty ✓ The merge comment's claims hold.

Edge-case probes (throwaway facts, never pushed): 3/3 pass

# Probe Result
P1 An empty lock name No unexpected exception type. Pass
P2 Ç in NFC and in NFD Both storable as ASCII, and they are distinct locks. Pass
P3 100,000 × ş Storable and deterministic. One extra character gives a different lock. Pass

Not run: the first OIDC publication of a new package id, which belongs to the release owner.

Labels: agent-verified.

Owner: safe to merge — summary: adds the optional Goldpath.Locking.Oracle package (distributed locks on Oracle via DBMS_LOCK, with the same contract as Redis and Postgres). Lock names that are non-ASCII or longer than 128 bytes are hashed deterministically, so Turkish or long tenant-prefixed names do not throw. Tier C, so it waits for your merge.


Generated by Claude Code

@omercelikdev omercelikdev added the agent-verified Independently verified by the verifier agent: ready for owner merge label Nov 8, 2026
# Conflicts:
#	CHANGELOG.md
#	docs/strategy/ga-gate-status.md
@omercelikdev omercelikdev removed the agent-verified Independently verified by the verifier agent: ready for owner merge label Nov 8, 2026
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Brought up to date with main@543747a, as merge commit fd186ca. Conflicts were in CHANGELOG.md and docs/strategy/ga-gate-status.md. Back to the verifier.

ga-gate-status.md: the conflict was in the G7 row.

CHANGELOG.md: both sides' [Unreleased] ### Added entries are kept.

What merged without conflicts: Directory.Packages.props, nightly.yml and Goldpath.sln. The ODP.NET 23.26.301 pin agrees with main's Oracle EF provider 10.23.26301.

Build, tests and gates:

  • dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
  • Goldpath.Locking.Tests: 17/17.
  • OracleLockNameTests: 25/25.
  • scripts/license-gate.py: rc 0.
  • docs-freshness, ledger-check, schema-honesty, skills-parity, template-pins, api-review-gate: rc 0 for each.

Not run here: LockContractOracleTests, which is Category=Oracle and needs the Oracle container. CI's oracle job runs it.

agent-verified is removed because the verified head changed.


Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Verifier verdict (run 2026-11-09)

Head verified: fd186caff5e6a00e1bf3024eba0240babc1039ec. It merges main@543747a into a236b66, the head I verified on 2026-11-08.

Verdict: changes requested. 0 BLOCKER, 0 MAJOR, 1 MINOR, 0 NIT. Tier C, so this PR is never auto-merged.

  • The merge itself is clean. The finding is new, from an edge-case probe this run: cancellation of a waiting acquire is not honoured on Oracle, and nothing says so.
  • It is the library's behaviour, not Goldpath's: Goldpath passes the token down. But the provider is new in this PR, and its runbook is the place an operator learns the provider's semantics.

Finding

1. MINOR: on Oracle, a cancelled AcquireLockAsync keeps waiting for the whole timeout, and the runbook does not say so.

  • Where: packages/Goldpath.Locking.Oracle/ops/locking-oracle.md. It has nothing on cancellation, and ## Timeouts climbing is the nearest section.
  • Probe P3 (throwaway fact on the real Oracle container, never pushed):
    • Hold GoldpathLockNames.Global("ğ" + 150 × 'x').
    • Then AcquireLockAsync(sameName, 30 s, cts.Token) with cts cancelled after 500 ms.
    • Result: it returns only after ≈ 30 s. The test failed on sw.Elapsed < 10 s.
  • Probe P4: the same against a raw OracleDistributedSynchronizationProvider, with no Goldpath layer, a 20 s timeout and the token cancelled at 500 ms. OperationCanceledException after 00:00:20.06.
    • So DBMS_LOCK.REQUEST is not interrupted. The token is observed only once the server-side wait ends.
    • OracleLockNames maps CreateLock only, and GoldpathMeteredLockProvider forwards the token (GoldpathLockingExtensions.cs:165–192). This PR's code does not drop it.
  • Why it matters:
    • A host shutting down, or a request aborted by its client, stays blocked on a held Oracle lock for the full acquire timeout.
    • With a long timeout (minutes, for a nightly job's guard), graceful shutdown can exceed Kubernetes' termination grace and the pod is killed mid-work.
    • The deep-review rule is that cancellation tokens are honoured and passed down. Where a provider cannot honour one, the operator needs to know.
  • Fix expected:
    • Add a short section to the runbook: on Oracle a cancelled acquire returns only when DBMS_LOCK's wait ends, so it can take up to the acquire timeout. Keep acquire timeouts shorter than the host's shutdown timeout and the termination grace, or loop on TryAcquireLockAsync with a short timeout while checking the token. Mention it in the package README's Oracle notes as well.
    • Optionally pin it with a fact on LockContractOracleTests (my P3, asserting the observed behaviour), so a library upgrade that starts honouring cancellation is noticed.
    • Or, if you prefer to make it honour cancellation, do it by bounding each TryAcquire slice in the decorator. That is a design choice, so documentation alone is acceptable.

Delta since my last verdict

  • The merge: the PR's added and removed lines against main are identical, file by file, to the verified diff, except the G7 row of docs/strategy/ga-gate-status.md.
  • The G7 row: a character-level diff of main's row against the PR's row is a pure insertion of this PR's O-4 paragraph in front of main's new O-5 text, so no main text is lost.
  • CHANGELOG: identical PR content. Directory.Packages.props: the ODP.NET pin 23.26.301 agrees with main's Oracle.EntityFrameworkCore 10.23.26301.

What I checked

Step Result
1. Scope Merge only. #407's criteria are unchanged.
2. Ledgers G7 is correctly merged. stryker/README, release-checklist and ai-sdlc-status are unchanged in PR content.
3. Confidentiality The diff against main: 0 hits.
4. Build dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
4. Tests Goldpath.Locking.Tests 17/17. LockContractOracleTests + OracleLockNameTests + LockContractTests (Oracle Free, Postgres and Redis containers) 35/35, under LC_ALL=tr_TR.UTF-8.
4. Red proof on this head OracleLockNames removed from the composition (GoldpathOracleLockingExtensions.cs:43): ORA-12899 … (actual: 148, maximum: 128), Failed 1/6. Restored, with a clean tree.
4. Gates docs-freshness, ledger-check, schema-honesty, skills-parity, template-pins, api-review-gate: rc 0. license-gate.py: rc 0. dotnet list … --vulnerable --include-transitive: none.
5. CI on fd186ca 24 of 26 green, including oracle, integration, gates and the GM matrix. The 2 merge-policy runs are ✗ by design (Tier C).
6. Charter n.a.

Deep review

Dimension Result
a Security ✓ Unchanged: a minimal grant, MIT dependencies pinned, no vulnerabilities.
b Correctness & edge cases ✓ A long tenant-prefixed Turkish name works end to end on Oracle (P1).
c Concurrency ✓ 8 concurrent acquires of one hashed name: exactly one wins (P2).
d Data & migrations n.a.
e Performance n.a.
f Compatibility ✓ Additive.
g Test quality ✓ The red proof reproduces. Cancellation has no fact: finding 1.
h Code quality ✓ The conflict resolution is a clean union.
i Observability & operability Finding 1: the shutdown/cancellation behaviour is undocumented.
j Honesty ✓ The merge comment's claims hold.

Edge-case probes (throwaway facts on a real Oracle Free container, never pushed)

# Probe Result
P1 Tenant musteri- + 56 × a and resource gece-raporu-ışık- + 40 × İ, through GoldpathLockNames.For: acquire, contend, release, re-acquire Exclusive; the loser gets null and the handover works. Pass
P2 8 concurrent TryAcquireLockAsync on 200 × 'ş' (hashed) Exactly 1 non-null. Pass
P3 Acquire with a 30 s timeout on a held lock, token cancelled at 500 ms It returned after ≈ 30 s. Fail: finding 1
P4 P3 against the raw Medallion Oracle provider (20 s) OperationCanceledException after 20.06 s, so the behaviour is the library's. Evidence for finding 1

Not run: the first OIDC publication of a new package id (the release owner's).

Labels: changes-requested. The fix is a runbook/README paragraph, plus an optional fact.


Generated by Claude Code

@omercelikdev omercelikdev added the changes-requested Verifier found problems; the worker fixes these first label Nov 9, 2026
…said and pinned (#407)

Verifier finding 1 (MINOR) on fd186ca: DBMS_LOCK.REQUEST is a server-side wait
DistributedLock.Oracle does not interrupt, so a cancelled acquire on a held lock
returns only when its timeout ends; nothing told an operator.

- ops/locking-oracle.md: "Cancellation and shutdown" — the behaviour, that Goldpath
  passes the token down, and what a host does about it (acquire timeouts shorter than
  HostOptions.ShutdownTimeout and the termination grace, or short TryAcquire slices
  checking the token).
- README: the same, in one paragraph, linking the section.
- LockContractOracleTests: a held lock, an 8 s acquire cancelled at 0.5 s, throws
  OperationCanceledException only after >= 6 s — so a library upgrade that starts
  honouring cancellation is noticed. 7/7 on Oracle Free 23.26.3.
- CHANGELOG [Unreleased]: the documented behaviour and the new fact; the list's
  count ("Three more facts") corrected.

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

Copy link
Copy Markdown
Collaborator Author

Addressed verifier findings: MINOR 1 (cancellation on Oracle), the documentation fix plus the optional fact. Head is now 71fd1bd. It merges cleanly onto main@3968ab5.

  1. Runbook. ops/locking-oracle.md has a new section, § Cancellation and shutdown, that says:
    • a cancelled acquire on a held lock returns (OperationCanceledException) only when DBMS_LOCK.REQUEST's server-side wait ends, which can be the full acquire timeout;
    • Goldpath passes the token down unchanged, so this is the library's behaviour;
    • Redis and Postgres are not affected;
    • what a host does about it: keep every acquire timeout shorter than HostOptions.ShutdownTimeout and terminationGracePeriodSeconds, or loop on short TryAcquireLockAsync slices and check the token between them.
  2. README. One paragraph in the Getting-started notes, linking that section's anchor.
  3. Fact (your P3, pinned as the observed behaviour). LockContractOracleTests.A_cancelled_acquire_on_a_held_lock_waits_out_its_timeout_before_it_observes_the_token:
    • It holds a lock, then makes an 8 s acquire with the token cancelled at 0.5 s.
    • It asserts OperationCanceledException, and only after ≥ 6 s.
    • A library upgrade that starts honouring cancellation turns it red, and its XML summary points at the runbook section to revisit.
    • Run: LockContractOracleTests 7/7 on a real Oracle Free 23.26.3 container.
  4. CHANGELOG [Unreleased]. The behaviour is listed as "documented, not changed", and the new fact is in the proof list. That list's lead-in said "Three more facts" over four bullets; it now reads "More facts".

I made no code change to the provider. Bounding each TryAcquire slice in the decorator would be the design choice you left open; I did not take it.

Gates on this head (rc 0 for each): docs-freshness (which checks the new README anchor), ledger-check (GitHub half not run here), schema-honesty, skills-parity, template-pins, api-review-gate, merge-tier.py selftest. dotnet format whitespace --verify-no-changes on the test file: 0.

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

  • G7 Oracle 4/12: Ship the optional Goldpath.Locking.Oracle package (DBMS_LOCK via DistributedLock.Oracle) #407's criteria: all still met, as you verified on fd186ca. This delta is docs plus one fact.
  • Ledgers:
    • CHANGELOG [Unreleased] is updated.
    • There is no deferral. The optional "honour cancellation" design is your call, recorded in this thread, so no open-threads row.
    • ga-gate-status G7 is unchanged, because the status did not move.
  • XML docs: the new fact has its own ///. It is inserted before A_provider_left_in_configuration_for_another_store_is_refused, which carries no ///, so no doc comment is separated from its member.
  • Honesty: every sentence of the new section is pinned by the fact (the exception type, and waiting out the timeout) or by code (GoldpathMeteredLockProvider forwards the token).
  • Wired: the fact goes through AddGoldpathOracleLocking and the resolved IDistributedLockProvider, on a real server.
  • Contracts: no public surface changed.
  • Benches: n/a. The new fact costs about 8 s in the Oracle lane.
  • Deep self-review:
    • Applies: cancellation (the subject, pinned by the fact) and operability (the shutdown guidance).
    • Does not apply: security, input validation, concurrency, migrations, culture and performance. The delta has no code path.

Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Verifier verdict (run 2026-11-10)

Head verified: 71fd1bd657f612b6e937e4e53b79d5ce9f774569. My last verdict was on fd186ca. The delta is one commit (4 files: the runbook, the README, CHANGELOG, and one new Oracle fact).

Verdict: changes requested. 0 BLOCKER, 1 MAJOR (mechanical), 0 MINOR, 1 NIT. Last round's MINOR (cancellation on Oracle undocumented) is fixed, and the new fact holds on a real Oracle. What is left is a conflict with today's main. Tier C.

Finding

1. MAJOR: the PR no longer merges into today's main; CHANGELOG.md and docs/strategy/ga-gate-status.md conflict.

Delta reviewed (fd186ca..71fd1bd)

  • Runbook § Cancellation and shutdown: says that a cancelled acquire on a held lock is observed only when DBMS_LOCK.REQUEST's server-side wait ends, that Goldpath passes the token down, and what a host should do (acquire timeout below HostOptions.ShutdownTimeout and terminationGracePeriodSeconds, or short TryAcquireLockAsync slices). It matches what I measured.
  • README: one paragraph, linking #cancellation-and-shutdown. The anchor resolves (docs-freshness checks it).
  • The fact A_cancelled_acquire_on_a_held_lock_waits_out_its_timeout_before_it_observes_the_token: an 8 s acquire, cancelled at 0.5 s, must throw OperationCanceledException and only after ≥ 6 s. Its /// sits on the new member, before a member that has none.
  • CHANGELOG: a "documented, not changed" bullet, and "Three more facts" became "More facts" over the list (that list now has five).

What I checked

Step Result
1. Scope Only last round's finding. No code change to the provider; the "bound each slice in the decorator" design is left open, as offered.
2. Ledgers CHANGELOG [Unreleased] is updated. No deferral, so no open-threads row.
3. Confidentiality The delta: 0 hits.
4. Build Goldpath.IntegrationTests -c Release: 0 warnings, 0 errors.
4. Tests LockContractOracleTests on a real gvenzl/oracle-free container: all passed, including the new fact (8 s) and my three probes below.
4. Red proof n.a. for this delta: the fact pins the library's behaviour, so there is no fix to plant. My P2 shows the same behaviour through AcquireLockAsync, so the fact does not pass by accident.
4. Gates docs-freshness, ledger-check, schema-honesty, skills-parity, template-pins, api-review-gate, license-gate.py: all rc 0.
5. CI on 71fd1bd All green, including oracle, integration, gates, kit and the GM matrix. merge-policy is red by design (Tier C without owner-approved).
6. Charter n.a.

Deep review (delta)

Dimension Result
a Security n.a. Docs and a test.
b Correctness & edge cases ✓ A token cancelled before the call is honoured at once (P1); the lock stays usable after a cancelled wait (P3). See the NIT.
c Concurrency ✓ No new shared state.
d Data & migrations n.a.
e Performance ✓ The fact costs about 8 s in the Oracle lane.
f Compatibility ✓ No API change.
g Test quality ✓ It asserts behaviour on a real server. A library upgrade that starts honouring cancellation turns it red, which is its purpose.
h Code quality ✓ The fact's summary says why it exists and what to revisit.
i Observability & operability ✓ The shutdown guidance is now where an operator looks.
j Honesty ✓ Every sentence of the new section holds against the facts and probes. Finding 1 is the conflict, not a claim.

Edge-case probes (throwaway facts on a real Oracle Free container, reverted, never pushed)

# Probe Result
P1 A token cancelled before TryAcquireLockAsync is called, on a held lock OperationCanceledException after 2 ms. Pass, but see the NIT.
P2 AcquireLockAsync (not Try…), 8 s timeout, cancelled at 0.5 s OperationCanceledException after 8.05 s. Pass: the doc's "TryAcquireLockAsync / AcquireLockAsync" holds for both.
P3 After a cancelled wait, release the holder and acquire again Acquired. Pass: a cancelled waiter leaves nothing behind.

NIT (optional)

  1. The runbook says cancelling "does NOT return it early". P1 shows that a token that is already cancelled when the call starts is honoured at once. A short clause would stop a reader from concluding that a shutdown-time call always waits: "(a token already cancelled when the call starts is honoured at once)".

Labels: changes-requested. Only the merge with main is needed; the content is verified.


Generated by Claude Code

Conflicts were only in ledger files (CHANGELOG.md, docs/strategy, stryker/README.md)
after #546 and #554 merged. Every entry from both sides is kept; where both edited one
row, main's text carries this PR's own insertion. The PR's diff against main is its
original diff for these files. ledger-check, docs-freshness and schema-honesty exit 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Brought up to date with main (after #546 and #554) by the owner's session. Conflicts were only in ledger files (CHANGELOG.md, docs/strategy, stryker/README.md). Every entry from both sides is kept, and where both edited one row, main's text carries this PR's own insertion. For every conflicted file, the PR's diff against main equals its original diff, checked line by line. ledger-check, docs-freshness and schema-honesty exit 0. No code change.


Posted by Claude Code on the owner's instruction (2026-11-10: "Evet, yap").

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

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

Head verified: 7ead97e30223c780b2e9c2753956e6edb5ca2689, the owner's merge of main@202819a into 71fd1bd, which I verified this morning.

Verdict: changes requested. 0 BLOCKER, 1 MAJOR (mechanical), 0 MINOR, 1 NIT (carried over). This morning's conflict is resolved correctly, but main has moved since (#530 and #522) and CHANGELOG.md conflicts again. The content is verified. Tier C.

Finding

1. MAJOR: the PR does not merge into today's main@6f59458; CHANGELOG.md conflicts.

Delta since my last verdict

  • Only the merge commit. The PR's added and removed lines against 202819a are identical to the diff I verified on 71fd1bd against 543747a, except in the G7 row of ga-gate-status.md.
  • The G7 row: I compared main's row with the PR's row character by character. The difference is one pure insertion, this PR's O-4 paragraph. Main's text, ORA-6 included, is intact. 26 files, +789/−20.

What I checked

Step Result
1. Scope Merge only. #407's criteria are unchanged.
2. Ledgers G7 is a pure insertion. The CHANGELOG is finding 1.
3. Confidentiality The diff against main: 0 hits.
4. Build dotnet build tests/Goldpath.Locking.Tests -c Release: 0 warnings, 0 errors.
4. Tests Goldpath.Locking.Tests: 17/17. The Oracle facts (LockContractOracleTests, OracleLockNameTests) ran this morning on identical code. CI oracle is green on this head.
5. CI on 7ead97e 23 of 24 green, including gates, integration, oracle, kit, every GM shape and CodeQL. merge-policy is red by design: Tier C, with no owner-approved label.
6. Charter n.a.

Deep review (delta = merge only; full tables in the 2026-11-07..10 verdicts)

Dimension Result
a Security ✓ The provider code is byte-identical.
b Correctness & edge cases ✓ Unchanged since this morning's P1–P3 on Oracle.
c Concurrency n.a. Unchanged.
d Data & migrations n.a. Unchanged.
e Performance n.a. Unchanged.
f Compatibility ✓ No API change in the delta.
g Test quality ✓ Unchanged.
h Code quality ✓ The resolution is a clean union.
i Observability n.a.
j Honesty ✓ The merge comment's claims hold.

Edge-case probes (this run)

# Probe Result
P1 The PR's content against main, file by file, compared with the verified diff Identical, except the G7 insertion. Pass
P2 The G7 row, character by character, against main's row A pure insertion. Pass
P3 A merge with today's main@6f59458 CHANGELOG conflict. Fail: finding 1

NIT (optional, from this morning): the runbook's "does NOT return it early" could say that a token already cancelled when the call starts is honoured at once.

Labels: changes-requested stays. Tier C: the owner merges after the refresh.


Generated by Claude Code

…on, keeping #530's and #522's entries)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Brought up to date with main@6f59458 (#530, #522) by the owner's session — the verifier's only MAJOR here. Merge commit 9a9318c, no rebase.

Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Verifier verdict (run 2026-11-11)

Head verified: 9a9318c06f739337e69fd518f4dd1f1af10ddfda. My last verdict was on 7ead97e. The delta is the owner's merge of main@6f59458 only (9a9318c). Tier C (a new package's .github wiring, the RFC and ledgers), so it is not auto-merged.

Verdict: verified. 0 BLOCKER, 0 MAJOR, 0 MINOR, 1 NIT (carried over, optional). Yesterday's MAJOR (the CHANGELOG conflict) is resolved. The PR merges cleanly into today's main@2782d3c, which has #528 since.

Delta since my last verdict

What I checked

Step Result
1. Scope Merge only. #407's criteria are unchanged (full review in the 2026-11-07..10 verdicts).
2. Ledgers The CHANGELOG, G7 row, ai-sdlc-status, the API-review TSV and stryker/README.md are unchanged in PR content. No T-number is added.
3. Confidentiality The diff against main: 0 hits.
4. Build + tests Merged locally with main@2782d3c: Goldpath.Locking.Tests 17/17, with no warnings.
4. Gates (merged tree) docs-freshness, ledger-check, schema-honesty, skills-parity, template-pins: rc 0 ×5.
5. CI on 9a9318c 24/25 green: gates, integration, oracle, kit, alert-rules, every GM shape and CodeQL. merge-policy is ✗ by design: Tier C without owner-approved.
6. Charter n.a.

Deep review (delta = merge only)

Dimension Result
a Security ✓ The provider code is byte-identical to the verified head.
b Correctness & edge cases ✓ Unchanged since the Oracle probes of 2026-11-10.
c Concurrency n.a. Unchanged.
d Data & migrations n.a. Unchanged.
e Performance n.a. Unchanged.
f Compatibility ✓ No API change in the delta.
g Test quality ✓ Unchanged.
h Code quality ✓ The union resolution is clean.
i Observability n.a.
j Honesty ✓ The merge comment's "0 extra added, 0 missing, 0 extra removed" holds (P1).

Edge-case probes (this run)

# Probe Result
P1 The PR's content against today's main, file by file, compared with the verified diff Identical in 26/26 files. Pass
P2 A merge with today's main@2782d3c (#528) Clean. Gates rc 0, Locking 17/17. Pass
P3 The CHANGELOG [Unreleased] ### Added after the union O-4, #530 and #522 are all present in full. Pass

Not run: the Oracle lock facts locally. The code is byte-identical to the head where I ran them on 2026-11-10, and CI oracle is green on this head.

NIT (optional, unchanged): the runbook's "does NOT return it early" could add that a token already cancelled when the call starts is honoured at once.

Merge order: #529, #535, #537 and #538 all add CHANGELOG [Unreleased] entries, and #537 and #538 already conflict with main again. To avoid another refresh round, merge them one at a time, each right after its refresh.

Labels: changes-requested removed, agent-verified added. Tier C, so not auto-merged.

Owner: safe to merge — summary: adds the optional Goldpath.Locking.Oracle package, which takes distributed locks on Oracle through DBMS_LOCK via DistributedLock.Oracle. A cancelled acquire on Oracle waits out its timeout, and the docs say so.


Generated by Claude Code

@omercelikdev omercelikdev added agent-verified Independently verified by the verifier agent: ready for owner merge owner-approved ADR-0014: the owner approves merging this Tier C agent PR and removed changes-requested Verifier found problems; the worker fixes these first labels Nov 11, 2026
CHANGELOG.md: both sides' [Unreleased] entries kept (Added and Changed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AFdNZbL5UCo9Kkefph8f3
@omercelikdev omercelikdev removed the agent-verified Independently verified by the verifier agent: ready for owner merge label Nov 11, 2026
@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Brought up to date with main@02128c5. The head is now 27789b3, a merge commit with no rebase and no force-push.

Conflicts resolved in: CHANGELOG.md only. There were two hunks, both in [Unreleased]:

Both sides are kept verbatim, with no line dropped. git diff against each parent shows additions only.

docs/strategy/ga-gate-status.md and stryker/README.md changed on both sides and auto-merged. They touched different rows and paragraphs: main changed G4 and G10c and added the Messaging and Approvals paragraphs, while this PR changed G7 and the Locking row.

Build, tests and gates:

Check Result
dotnet build Goldpath.sln -c Release 0 warnings, 0 errors
tests/Goldpath.Locking.Tests 17/17
Goldpath.IntegrationTests, LockContract* (real Oracle Free container, plus Redis and PostgreSQL) 11/11
docs-freshness (25 packages), schema-honesty, skills-parity, template-pins, api-review-gate, engine-gate (11 of 11), license-gate.py (GREEN), merge-tier.py selftest rc 0 each
ledger-check.sh rc 0, but it skipped the GitHub reconciliation because there is no authenticated gh in this session

The PR's behaviour, API and recorded decisions are unchanged by the merge. I removed agent-verified because the verified head changed. Back to the verifier.


Generated by Claude Code

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

Synced with main@9311ccd (#552, the surface freeze gate) in 534e588. The only conflict was in CHANGELOG.md [Unreleased], and both sides were kept.

The PR's own diff in every ledger file is unchanged by the resolution. These ran locally on the merged tree:

The oracle job's earlier red on this PR (27789b3) was the campaign test that hangs on main too (#571). It is not this PR's locking code.

Owner's session (Claude Code).

@omercelikdev

Copy link
Copy Markdown
Collaborator Author

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

Head verified: 27789b3f2da2a876cce35266df6016c6bee6a1fa. My last verdict was on 9a9318c. The delta is one commit: the owner's merge of main@02128c5 (#529, #561, #558). Tier C, so this verdict is advice to the owner. Nothing merges it automatically.

Verdict: no findings in the PR's content. CI is red on this head, for reasons that come from main, so I am not adding agent-verified.

What I checked on the delta

  • Merge resolution. git diff-tree --cc 27789b3 shows hand-resolved hunks in three files only: CHANGELOG.md, docs/strategy/ga-gate-status.md and stryker/README.md. For each file I counted the lines main added between the old merge base 6f59458 and 02128c5, and checked that the merge carries every one: CHANGELOG 93/93, ga-gate-status 2/2, stryker/README 40/40. The O-4 CHANGELOG entry is still under [Unreleased], and the version-heading count is unchanged (10 = 10).
  • No content change. The Locking code (packages/Goldpath.Locking*) and its tests are unchanged since 9a9318c.
  • Build. dotnet build Goldpath.sln -c Release: 0 warnings, 0 errors.
  • Tests. Goldpath.Locking.Tests: 17/17 passed.
  • Gates. docs-freshness, ledger-check, schema-honesty, skills-parity and template-pins all PASS.
  • git merge-tree against today's main@86ab2df: clean.

CI on 27789b3

Three checks are red. None of them comes from this PR's code.

  1. gates: TickQueryCountTests.One_hungry_campaign_costs_a_fixed_number_of_commands_per_tick (Expected 7, Actual 8). I reproduced it locally on this head. This is the defect main had at 02128c5. test(campaign): pin 8 commands per steady tick — R3-S8's ceiling read (main red after #529 + #558) #563 (86ab2df) fixed it, after this merge.
  2. oracle: CampaignOracleTests.Thousands_release_paced_across_leader_handovers_and_a_live_throttle_lifts_the_ceiling. main@86ab2df fails the same test. It is tracked as Campaign Oracle lane: the live-throttle test hangs about half the time since #529 + #558 #571 (it hangs about half the time since feat(campaign): target-system ceilings as data — the seed rows, the pacer's bucket (R3.2a, R3-S8, #290) #529 + feat(campaign): a tick's releases go out as one batch through an internal seam member (#285, throughput Part 3/3) #558). It is not a Locking test.
  3. gm / GmCleanFeatures: a TaskCanceledException in DistributedApplicationFactory.StartAsync, after 5 m 1 s. This shape composes --features locking, so I ran it myself: ./scripts/validate-gm.sh GmCleanFeatures --broker none --layout clean-architecture --features audittrail --features idempotency --features dataprotection --features locking on this head reports GREEN (smoke 1/1 passed in 36 s). The shape was also green on 9a9318c, 7ead97e and 71fd1bd, with the same Locking code. I read the failure as the runner's AppHost start timing out, not as a regression.

Finding

  1. MAJOR (CI, required checks red on the head). ADR-0008 forbids a merge while a golden manifest is red, and gates is red.

Deep review (delta-scoped: a merge-only delta; the full review of the content is in my verdicts of 2026-11-10 and 03:28 today)

Dimension Result
a Security n.a.: no code delta. The package pins and licence-gate exception are unchanged
b Correctness & edge cases ✓ the merge dropped no line from either side (counts above)
c Concurrency n.a.: no code delta
d Data & migrations n.a.: none touched
e Performance n.a.
f Compatibility ✓ the PublicAPI.Unshipped entries are unchanged, and GoldpathLockProvider.Oracle = 3 is additive
g Test quality ✓ the Locking suite is unchanged and 17/17. The red→green proof stands from my earlier verdicts (no code changed since)
h Code quality n.a.: no code delta
i Observability n.a.
j Honesty ✓ the CHANGELOG, ga-gate-status and stryker README rows still match the code

Edge-case probes: none new, because the delta has no behaviour change. Instead I re-ran the one shape the merge could plausibly have broken (GmCleanFeatures, which composes Locking): GREEN.

Not run in this pass: the Oracle container lane for OracleLock* (the code is unchanged since my earlier run of it).


Generated by Claude Code

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 changes-requested Verifier found problems; the worker fixes these first owner-approved ADR-0014: the owner approves merging this Tier C agent PR 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.

G7 Oracle 4/12: Ship the optional Goldpath.Locking.Oracle package (DBMS_LOCK via DistributedLock.Oracle)

2 participants