Repository navigation
Conversation
Runs the Typhon.Engine suite nightly on Apple Silicon — the arm64 platform Typhon actually supports for developers, and one the x64 merge gate structurally cannot exercise (SL-07: acquire/release compile to plain mov under TSO, so conforming and violating code emit identical machine code there). This does NOT implement the [use-arm] Graviton token #624 describes; it is the cheaper alternative discussed in that thread. Graviton is not a platform we ship to, and a functional suite on any arm64 target still cannot catch the silent class SL-07 is about — a torn page carries a valid CRC, so nothing asserts on it. What this buys is regression coverage for OBSERVABLE arm64 failures on the hardware developers use. Non-blocking, never a required check. Execution model: the gate's committed K=8 shards.json assumes 16 physical cores (0.5 processes/core; K=16 was measured flaky). A macos-15 runner has 3 cores, where that plan would land at ~2.7 processes/core. The workflow instead generates a single-shard plan at runtime from shard.py's own catchall_filter() and points SHARD_PLAN at it — a serial workers=1 run that still inherits the Category=Sensitive quiet pass and the 2-attempt retry of failures run alone. Deriving the filter rather than hand-writing it means the nightly cannot drift if the gate ever excludes another category. Guards against a false green before any test runs: uname -m must be arm64 (macos-15-large is x64, one label typo away), and the .NET host must be arm64 too. An x64 SDK under Rosetta 2 executes with Apple's hardware TSO mode enabled, which would give the tests x86 memory ordering on ARM silicon — a green run proving nothing, with no outward sign. uname alone cannot see that, since the shell stays native. The pull_request trigger is filtered to this workflow's own path: scheduled and workflow_dispatch triggers only exist once a file is on the default branch, so without it this could not be tested until after it merged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LKFzE7MqQUj13s8a7q895D
… by the macos-15 nightly
The first arm64 nightly run failed eight tests. None was an arm64 defect; seven were tests whose synchronisation signal was not the thing they assert on, which resolves the convenient way on a 16-core box and does not on a 3-core one. Fixed rather than categorised — a quarantine tag would have frozen a wrong diagnosis, which is exactly what had already happened to one of them.
HighResolutionTimerServiceTests.Single_FiresAtExpectedRate and DriftPrevention_MetronomeStyle asserted a raw invocation count against an ASSUMED window. Thread.Sleep(100) is a floor, not a duration: it overshot to roughly 220ms on the runner, and the count then failed as "too many invocations" — indistinguishable, from the count alone, from a timer genuinely running fast. Both now measure the window with Stopwatch and assert the derived rate. The new upper bound is both tighter and portable: ExecuteCallbacks advances _nextTick by exactly one interval and, when behind, skips forward to within one interval of now, so a metronome provably cannot exceed elapsed/interval + the two window boundaries. A timer firing at 2.3ms in a true 100ms window still fails.
ChunksPerWorkerTests.WorkerCount1_TwoX_SingleWorkerHandlesBothChunks waited for ticksSeen, incremented by the "Tick" callback system that the query system under test runs AFTER — so the wait completed before "Single" had run and Shutdown truncated it (seen = 0 of 8). It now waits on seen itself. Its [Category("Sensitive")] is removed: the comment blamed parallel CPU load, but it failed on macOS inside the serial quiet pass, so that diagnosis was wrong and the tag was hiding the real cause. Verified green in the parallel shards under 32-way load.
ParallelQueryTests.ParallelQuery_MultiWorker_ChunksDistributedAcrossThreads used Thread.SpinWait(1000) to HOPE a sibling worker got scheduled meanwhile; with few usable cores one worker drained every chunk first and the test saw a single thread id. Replaced with a rendezvous — the first chunk blocks, releasing its core, until a second worker actually picks up work. Single-threaded dispatch still fails the assertion, on merit.
WalCommitBufferConcurrencyTests.Claim_LsnsRemainUniqueAndMonotonic_AcrossManyBufferSwaps had the only consumer in the file with no else branch, so it re-tried hot on an empty buffer and burned a core while six producers competed for the rest, starving them until their 20s claim deadline expired. Now parks on buffer.WaitForData(5) like its six siblings.
CpuSampleParserTests Parse_MergesFramesByMethod and Parse_ResolvesEngineFrameToSource saw zero frames for the burn method although samples were produced. Not root-caused: SpinHotLoop gains [MethodImpl(NoInlining)], which is correct regardless since both tests assert on a frame NAMED SpinHotLoop and RyuJIT's refusal to inline loop-bearing methods is an architecture-sensitive heuristic rather than a guarantee. A DescribeFixtureFrames() diagnostic is appended to both assertions so the next occurrence distinguishes "nothing sampled here" from "inlined into the caller" from "resolved but no PDB path", instead of printing "But was: False".
Not addressed, engine-side and left for a separate decision: WalCommitBuffer.cs:452 passes ctx.Deadline.Remaining as the wait duration to ThrowWalBackPressureTimeout. Remaining is ~0 by definition once the deadline has expired, so WalBackPressureTimeoutException can only ever report "timeout after 0ms" — it should carry elapsed wait time instead.
Full sharded suite green locally at the gate's K=8 config: 4158 tests, 0 failures.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LKFzE7MqQUj13s8a7q895D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A nightly (03:00 UTC) workflow that runs the
Typhon.Enginesuite on a GitHub-hostedmacos-15runner — Apple Silicon, i.e. a genuinely weakly-ordered arm64 target. Non-blocking, never a required check.Why this, and not the
[use-arm]Graviton tokenThis is not an implementation of issue #624 — it is the cheaper alternative discussed there. Two reasons that issue's premise doesn't hold up as scoped:
claude/rules/durability.md→ SL-07 says so directly: the failure mode is a torn page carrying a valid CRC (computed over the torn bytes), so ADR-015 page-checksum validation passes on reload and nothing in the suite asserts on post-checkpoint page content under concurrent mutation. Only a reduced litmus harness turns a silent reorder into an observable signal.So what this buys is precise and limited: regression coverage for observable arm64 failures — deadlocks, crashes, assertion failures — on hardware developers actually use. A green run means "no observable regression on a supported platform." It is not evidence that barriers are correct.
Execution model — serial, not the gate's 8 shards
The committed
shards.jsonis K=8, tuned for the c6id's 16 physical cores (0.5 processes/core; K=16 was measured flaky, perclaude/design/Infrastructure/ci-merge-gate.md). Amacos-15runner has 3 cores, where that plan lands at ~2.7 processes/core — well past the flaky threshold, and a nightly that cries wolf gets muted.The workflow therefore generates a single-shard plan at runtime from
shard.py's owncatchall_filter([])and pointsSHARD_PLANat it. That reuses the sharder's whole apparatus unchanged:Category!=Quarantine & Category!=Sensitive),Category=Sensitivequiet pass,shard.py's own comment notes those windows are tightest on slow CI cores, which is exactly where we are.Deriving the filter instead of hand-writing it means the nightly cannot drift if the gate ever excludes another category.
The false-green guard
Before any test runs, the job asserts the tests will execute as native arm64:
uname -mmust bearm64—macos-15-largeis x64, one label typo away;unamealone cannot see this, because the shell stays native.Both failure modes produce a confident false green, so they're asserted, not logged. The check reads both
Architecture:andRID:fromdotnet --info, so a format change in one field can't red the nightly on its own.Release is also deliberate beyond matching the gate: Debug constrains the JIT reordering and register allocation a missing barrier needs in order to become visible.
Why the
pull_requesttriggerScheduled and
workflow_dispatchtriggers only exist once a workflow file is on the default branch — so this could not be tested until after it merged. Thepull_requesttrigger is filtered to this workflow's own path, so it fires on the PR editing it and on no other. The run on this PR is the end-to-end test.Verification so far
Off-runner, everything testable was tested locally:
run:block passesbash -n; both embedded Python blocks parse.shard.pyimports cleanly andcatchall_filter([])yields(Category!=Quarantine)&(Category!=Sensitive).shard.pythrough the exactSHARD_REPO/SHARD_CONFIG/SHARD_PLANenv the workflow sets (scoped to one fixture) → 60 tests + 16Sensitive, PASS, trx written.shard.py's owntotal=76from those real trx files, and the verdict grep matched its output lines.Not verified: an actual
macos-15run — that is what this PR is for. The suite has never run on macOS in CI, so the first run may well be red. That is the job doing its work.Expected deltas vs the x64 baseline
Baseline is 4103 passed / 0 failed / 53 skipped.
DatabaseFileLockingTestscarries a[Platform("Win")]test that self-skips off Windows, so the skip count differs by at least 1. The summary renders both rows side by side so any other delta gets enumerated rather than assumed.timeout-minutes: 90is a guess with headroom — serial on 3 cores, wall-clock unknown. Tighten once there's a number.Note on the merge gate
This diff touches neither
src/Typhon.Engine/**,test/Typhon.Engine.Tests/**nortools/Typhon.Workbench/**, soaws-gateandtlaskip and no AWS instance boots.🤖 Generated with Claude Code
https://claude.ai/code/session_01LKFzE7MqQUj13s8a7q895D