feat(core): sync source-aware filter parity - #9
Merged
Conversation
Copy the Rust crates, vendored tokscale tree, C header, and provider-v3 fixture contract from TokenBar commit 55ca05d3a0a5bf0f02ed20f46bb3e73e65a07218. Preserve the empty Windows shared-tree patch table, the active cache format and parser identities, and the unchanged consumer-owned Cargo.lock. Expose tb_filter_parity_probe as the eleventh C ABI entry point. The probe derives the full client slice from a fresh graph, brackets hourly and Agents nil/full reports with token0 through token5 source generations, short-circuits unstable scans as sourceChanged or tokenUnavailable, compares integer aggregates exactly, and keeps independently refreshed cost diagnostic-only. Add the C# P/Invoke facade, strict lower-camel status decoder, nullable aggregate DTOs, invariant bounded smoke summary, and smoke entry. Numeric and unknown enum values now fail closed at the shared TbCore JSON boundary while every returned heap pointer continues through Unwrap and the existing finally tb_free ownership path. Pin CI, cross-check documentation, and the Windows sync ledger to the merged Native source. Record exact-tree exclusions and local validation without claiming hosted or real ARM64 runtime evidence for this sync. Verification: exact crates/vendor/header/fixture comparisons; focused Rust parity tests; focused rustfmt; scripts/check.sh with locked workspace check/test/release build, 319 FFI tests, 1,290 vendor unit tests plus integrations, 287 Core tests, and cache-only network-skipped P/Invoke smoke; final dotnet build and 287 tests after the strict-enum review fix; git diff --check; two fresh verifier passes, ending CONFIRMED.
Pass -AppleLanguages "(en)" to both the legacy and provider-v3 cross-check harness invocations so the Native 55ca05d fail-closed localization guard can generate canonical outputs. Keep the documented operator commands identical to the hosted CI contract.\n\nVerified both harness paths after rebuilding the locked Rust release archive: the legacy run produced 42 usage-pace and 74 format cases, while provider-v3 produced 12 cases. git diff --cached --check also passed.
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.
Summary
crates/, vendoredtokscale-core, the C header, and provider-v3 fixture contract exactly from TokenBar55ca05d3a0a5bf0f02ed20f46bb3e73e65a07218(Native PR #111 / issue #107)tb_filter_parity_probethrough C ABI and C# P/Invoke with source-generation-awarematch,mismatch,sourceChanged, andtokenUnavailableresultsSemantics
The probe derives the full client list from a fresh graph and brackets hourly/Agents nil-vs-full reports with opaque source tokens. Integer aggregates decide parity; cost remains diagnostic because pricing can refresh independently. A moving source is skipped as
sourceChangedrather than misreported as a filter mismatch.Cargo.lock, cache format/schema, parser versions, and vendored production APIs remain unchanged.Verification
crates/,vendor/(excluding Native-onlyvendor/AGENTS.mdand Windows-onlySYNC.md), C header, and provider-v3 fixturesscripts/check.shallowIntegerValues: false; second fresh verifier confirmed exact strings and fail-closed adjacent casesgit diff --checkCargo.lockunchangedPlatform boundary
This PR records macOS-side downstream validation. Hosted Windows x64 and ARM64 cross-package checks remain CI-owned; it does not claim a new real ARM64 runtime run.