mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-11-29 23:37:41 +00:00
* test(conformance): compare TypeScript resolution with compiler declarations * test(typescript): compare fixture declarations and runtime dispatch * test(typescript): compare namespace and generic dispatch fixtures with tsc * fix(typescript): resolve qualified types and nested generic references * test(typescript): run CLI, embedding and workspace fixtures in conformance * fix(typescript): compare JSX member bindings and callable declarations * test(bench): pin compiler-verified property declaration positions * test(typescript): exercise parser cache and graph publication in conformance * test(typescript): run graph publication and recovery fixtures in conformance * fix(typescript): select member overloads from bound call results * bench(typescript): pin the verified overload resolver source tree * test(typescript): compare property accesses and migrate mixed fixtures * test(typescript): require FTS and correct conformance run instructions * fix(typescript): attribute constrained and aliased types to their declarations * test(bench): verify graph and capture changes for TypeScript aliases * test(typescript): move MCP and embedding fixtures into native conformance * test(typescript): check callback signatures and concrete targets against the compiler * test(conformance): verify callback types and migrate TypeScript product fixtures * fix(typescript): propagate the selected overload return to receiver calls * test(conformance): compare callback assignments and preserve class-expression coverage * test(bench): pin the verified overload resolver tree for parse reuse * test(conformance): compare overloaded callbacks and migrate rename and workspace fixtures * fix(typescript): preserve distinct local classes and chained overload return types * test(conformance): cover dirty snapshot reuse and graph rename in the native runner * test(conformance): release the database when fixture setup fails * test(conformance): run TypeScript watcher and shared-store fixtures natively * test(conformance): verify embedding identity and cache reuse in the native runner * test(conformance): move shared-store checkout fixtures into TypeScript jobs * test(bench): pin cold and resumed graphs for the local-class resolver * test(conformance): compare block-shadowed property reads with TypeScript * test(conformance): exercise TypeScript WAL recovery and Git directory handling natively * fix(ingestion): count receiver ownership suppressions once after replay * test(conformance): exercise TypeScript source edits during cold and cached resolution * test(conformance): stage only bundled dependencies for the installed CLI fixture * test(conformance): verify cold and incremental TypeScript file reuse in the native suite * test(conformance): exercise mixed-language embedding chunk reuse and source ranges * fix(typescript): qualify class graph identities by their namespace * test(conformance): move mixed worker persistence and filesystem fixtures to Node * test(cache): verify namespace owner identities across all reuse phases * test(conformance): exercise all 38 POSIX atomic publication cases in the native job * Move TypeScript graph, heap and scenario fixtures to native conformance * Resolve inherited TypeScript overloads and verify transitive interface methods * Compare TypeScript method keys and move wiki and embedding fixtures to conformance * Run TypeScript-backed rename, benchmark and scenario fixtures in native conformance * Compare class type parameters with TypeScript and preserve literal constraints * Fix conformance lint, formatting and rename fixture file handling * Pin both verified cache trials for literal type parameters * Run embedding recovery and control-flow fixtures in TypeScript conformance * Check TypeScript local function identities and repository fixtures in conformance * Compile shared TypeScript callable query patterns once per worker * Verify the Java wildcard graph includes the field declaration column * Pin verified file reuse results for the consolidated TypeScript query * Compare generator, closure and shadowing fixtures with the TypeScript compiler * Run incremental database fixtures in TypeScript conformance on their original platforms * Limit receiver replay to files with call-result consumers and resolve TypeScript overloads in declaration order * Bind TypeScript ambient declarations in their project and reject named imports from declaration scripts * Verify compiler capture, graph and file reuse baselines for the scoped resolver Two real-corpus runs agree across all five reuse phases. The TypeScript ingestion workload retains its call targets on all three sizes. Method-declaration graphs add only the source columns of the Dart and Kotlin properties. The migrated private-field fixture contributes the one additional array push reported by both runtimes. * Shard the Linux TypeScript product tests and require coverage from both runners * Run full-text opt-out lifecycle fixtures in native TypeScript conformance * Verify actual CLI exits, repeated skill output and shared-store analysis * Match TypeScript inheritance order, declared generic defaults and interface method identities * Trace callable arguments through TypeScript constructors and conditional expressions * Give anonymous TypeScript signatures their own generic scope * Move parser drain and analysis lifecycle fixtures into native conformance * Verify TypeScript reference and capture changes against frozen benchmark corpora * Move TypeScript incremental analysis and external config fixtures to conformance * Skip interface identity and callable-flow work for ordinary TypeScript values * Check TypeScript overload declarations and migrate fixture-backed product coverage * Resolve TypeScript script visibility, merged overloads, and immutable receivers * Record the verified TypeScript parse-cache benchmark graphs * Use TypeScript project file membership for global declarations * Match merged rest overloads and hoisted script declarations * Run TypeScript-backed indexing, worker, and rename fixtures in conformance * Move TypeScript gRPC and workspace-link fixtures to conformance * Keep runtime inference out of TypeScript compiler conformance * Keep TypeScript compiler conformance focused on static resolution * fix(typescript): preserve compiler-selected project and method bindings * test(typescript): compare callback sites with the resolved call range * test(typescript): let the compiler check namespace and ambient exports * style(test): format TypeScript conformance fixtures * test(typescript): align capture and receiver benchmarks with the compiler corpus Fingerprint all 174 capture inputs. Compared with main, these inputs add 25 call-result assignments, 19 type references and four scopes. Preserve the scaling budgets. The former duplicate Store fixture contributed one unresolved array push. Replaying both revisions on the current corpus yields exactly the same 20 TypeScript drop sites. Restore the original receiver counts. * perf(typescript): limit overload lookup to compiler-visible bindings * Compare TypeScript module ownership, defaults, and tuple bindings with the compiler Treat export flags as declaration metadata so identifier length cannot displace the declaration anchor. The benchmark corpus gains two reads and two calls to the two extractor helpers. All five cache scenarios keep their previous reparse counts. * Check published call locations and keep receiver replay scoped to call sites Resolve qualified heritage through its lexical namespace and honor TypeScript module detection for script globals. Index overload consumers by scope so 400 independent functions take 400 owner checks instead of 80,200. The published graph and all five real-corpus cache fingerprints remain stable. * Resolve script globals within their TypeScript projects and namespaces Follow compiler project references and source directives, share the global binding tables, and keep namespace values from resolving to unrelated types. Record the compiler-verified declaration positions in the lexical benchmark. * Resolve destructured script globals and preserve CommonJS loader targets Compare script bindings with TypeScript and forwarded CommonJS values with Node after compilation. Move capture ordering and worker parity checks to the native conformance job. Verify the iterable benchmark against the compiler-selected Value.save declaration. * Preserve TypeScript default factory exports across unrelated writes * Resolve standalone TypeScript projects and callable CommonJS exports * Match TypeScript compiler overloads, overrides, and narrowed calls * Resolve TypeScript CommonJS defaults using the project's module format * Check block-local handler bindings against the TypeScript compiler * Run TypeScript compiler conformance from one entry point * Match TypeScript on scoped enum members and tuple overloads * fix(typescript): address resolver and compiler conformance review Preserve shared overload implementation edges and exact literal member keys. Track reachable writes and namespace receiver types, honor inherited package mode, and scan shared overload bindings once. Extend compiler and graph controls for the outstanding literal, scope, and generic-parameter findings. * fix(typescript): verify module bindings and computed keys against runtime Restrict factory invalidation to reachable direct eval and preserve CommonJS wrapper binding order. Evaluate grouped numeric operands in property keys. Add runtime, compiler and scope controls. Update only the capture digests attributable to the awaited tuple marker. * fix(typescript): preserve native ESM exports around CommonJS references Use the module format to select explicit ESM exports in JavaScript and TypeScript. Check namespace keys and imported call targets against Node for .mjs, .mts, .js and .ts, with executable CommonJS controls. * fix(ingestion): preserve JavaScript and TypeScript binding identities Honor project nullability during overload selection and distinguish lexical loop callables. Preserve empty TypeScript method names and signatures through database publication. Track CommonJS wrapper identity across reassignment and grouping. Resolve JavaScript numeric property keys under the owning package format and refresh the affected index rows after a manifest change. * fix(ingestion): restore compiler-proven graph edges and CI parity Correct ESM package scope, CommonJS wrapper evaluation, strict class keys and TypeScript overload and field resolution. Share workspace discovery across providers in the same scan. Pin the verified graph changes to the exact benchmark inputs, preserve the measured performance limits, and cover the reported cases with compiler and runtime regressions. * fix(ingestion): validate package reads and TypeScript type evidence Read package manifests through the same validated descriptor. Preserve keyof precedence, cooked template overloads, and static computed method identities. Pin the compiler-confirmed graph changes to the frozen benchmark inputs. * fix(ingestion): resolve nullable inheritance and TypeScript overloads Preserve nullable generic override targets across C#, Kotlin and Dart. Match TypeScript overloads for loose object fields and inherited instance methods on union receivers. Share the verified parse-cache graph expectations across the two source revisions. * fix(ingestion): preserve narrowed call targets and generic overrides Carry prior instanceof exclusions through direct else-if chains and respect execution order for CommonJS wrapper writes. Match scoped C# reference and global-qualified generic signatures and Kotlin nullable generic arguments. Add compiler-backed regression cases and record the verified cache graph identity. * fix(ingestion): preserve constructed overrides and guard C++ defaults Retain the scoped identity and nested arguments of nullable C# and Dart overrides. Keep earlier C++ template parameters when parser recovery truncates a comparison in the last default. Add compiler-backed positive and negative controls. * fix(ingestion): resolve Map entries and qualified nullable overrides * ci: require both compiler checks for coverage reuse * test(bench): verify resolver graph on release corpus * fix(ingestion): preserve scoped call and override identities * fix(ingestion): preserve timer handles and inherited method targets Classify host timer registrations through lexical bindings. Preserve Vue inherited method selection and C++ digit-separated template arguments. Track Babel in the parse cache, skip unnecessary generic substitution work, and verify both frozen graph corpora. * fix(ingestion): preserve module exports and method return types Keep CommonJS wrapper-only exports out of native ES modules. Resolve TypeScript literal method returns by owner and preserve rooted nullable C# generic overrides. Record exact graph equivalence for both frozen corpora. * fix(ingestion): preserve receiver and override targets Separate TypeScript static and instance lookup and retain nullable C# and Kotlin override identity. Make conformance ordering and syntax scanning explicit. Both frozen cache corpora preserve all graph rows and duplicate counts. * test(java): load graph helpers in native Node Use the conformance comparator from a native ECMAScript module. The Java contract runner imports the TypeScript graph helper directly under Node 22. * fix(csharp): resolve named tuple overrides and repair CI checks Compare C# tuple element types and labels in declaration scope and select an eligible inherited method. Cover method arity, accessibility, return conversions and closed slots. Verify raw Git path bytes and preserve Node test registration. Both frozen graph corpora match on the new source trees. * fix(ingestion): preserve CLR override identities and C++ template defaults Resolve predefined C# types in their declaring scope and compare explicit ValueTuple and Nullable return types, including array variance and long tuples. Keep C++ comparison operators intact inside template parameter defaults. Preserve point and range coordinates in the lexical benchmark. Add compiler-backed regressions and record the verified graph equivalence. * fix(ingestion): resolve default classes and namespace aliases Preserve default-class ownership through parentheses and stop at nested anonymous classes. Keep existing CommonJS exports across unrelated property writes. Resolve ambient namespace aliases by public name and preserve type-only visibility. Document receiver filtering and add regression coverage. * fix(ingestion): preserve compiler-selected bindings Filter function-local namespace accesses. Preserve Node setImmediate handles and qualified verbatim C# names. Use each TypeScript project’s optional-property rules for overload selection and verify the resulting call and read edges against the compiler. * test(bench): record frozen graph equivalence Accept the verified source trees for the two existing frozen-corpus expectations. All 1,671,468 graph rows and their multiplicities matched across ten indexing runs; all 78 negative controls rejected altered evidence. * fix(ingestion): preserve template defaults and TypeScript call targets Recover complete C++ template defaults from verified parser spans and retain their source spelling. Resolve intrinsic Set tuple iteration and matching primitive method overloads across union receivers. Add compiler-backed positive and negative controls. * fix(ingestion): address SonarCloud findings in compiler conformance Simplify resolver and conformance code, preserve compiler-selected bindings, and distinguish C++ reference overloads in the graph lookup cache. Record graph equivalence for both frozen benchmark corpora. * refactor(ingestion): simplify four resolver functions Resolve the remaining four hosted SonarCloud complexity findings. Preserve class ownership, narrowing order, tsconfig file selection, and template parameter parsing. Record the matching graph fingerprints for both frozen corpora. --------- Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
53 lines
2.2 KiB
JavaScript
53 lines
2.2 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { createHash } from 'node:crypto';
|
|
import fs from 'node:fs';
|
|
|
|
// Entries without `removals` pin an empty set of removed references.
|
|
const NO_ROWS = { count: 0, sha256: createHash('sha256').digest('hex') };
|
|
|
|
let manifest;
|
|
|
|
export function expectedReferenceAdditions(revision) {
|
|
manifest ??= JSON.parse(
|
|
fs.readFileSync(new URL('./expected-reference-additions.json', import.meta.url), 'utf8'),
|
|
);
|
|
if (Object.hasOwn(manifest, revision)) return manifest[revision];
|
|
// Archived reports use the original two-tree keys. New reports can replay
|
|
// those receipts only for their complete, explicitly audited checkouts.
|
|
if (typeof revision === 'string' && revision.startsWith('checkout-sha256:')) {
|
|
return Object.values(manifest).find((entry) => entry.checkoutFingerprint === revision);
|
|
}
|
|
}
|
|
|
|
/** Check every node field when a pinned compiler comparison adds declaration positions. */
|
|
export function assertSemanticNodes(revision, baseline, candidate) {
|
|
const expected = expectedReferenceAdditions(revision)?.declarationPositions;
|
|
if (expected) {
|
|
assert.deepEqual({ baseline, candidate }, expected, 'Unexpected declaration positions');
|
|
} else {
|
|
assert.deepEqual(candidate, baseline, 'Semantic nodes differ');
|
|
}
|
|
}
|
|
|
|
/** Both the parity producer and the performance checker require the same evidence. */
|
|
export function assertReferenceAdditionReceipt(revision, receipt, edgeDelta) {
|
|
const expected = expectedReferenceAdditions(revision);
|
|
if (!expected) {
|
|
assert.notEqual(receipt?.mode, 'added-references', 'Unknown reference corpus');
|
|
return;
|
|
}
|
|
assert.equal(receipt?.mode, 'added-references', 'Missing expected added reference receipt');
|
|
assert.deepEqual(receipt.additions, expected.additions, 'Unexpected added reference receipt');
|
|
assert.deepEqual(
|
|
receipt.typeOnlyImports,
|
|
expected.typeOnlyImports,
|
|
'Unexpected type-only imports',
|
|
);
|
|
const removals = expected.removals ?? NO_ROWS;
|
|
assert.deepEqual(receipt.removals ?? NO_ROWS, removals, 'Unexpected removed reference receipt');
|
|
assert.equal(
|
|
edgeDelta,
|
|
expected.additions.count - removals.count,
|
|
'Unexpected reference count change',
|
|
);
|
|
}
|