feat(ruby): Implement RubyManifestParser for parsing gem groups and dependencies
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled

feat(ruby): Add RubyVendorArtifactCollector to collect vendor artifacts

test(deno): Add golden tests for Deno analyzer with various fixtures

test(deno): Create Deno module and package files for testing

test(deno): Implement Deno lock and import map for dependency management

test(deno): Add FFI and worker scripts for Deno testing

feat(ruby): Set up Ruby workspace with Gemfile and dependencies

feat(ruby): Add expected output for Ruby workspace tests

feat(signals): Introduce CallgraphManifest model for signal processing
This commit is contained in:
master
2025-11-10 09:27:03 +02:00
parent 69c59defdc
commit 56c687253f
87 changed files with 2462 additions and 542 deletions

View File

@@ -202,11 +202,17 @@ public sealed class ScannerToSignalsReachabilityTests
throw new InvalidOperationException($"Hash mismatch for {request.FileName}: expected {request.Hash} but computed {computedHash}.");
}
var casUri = $"cas://fixtures/{request.Component}/{request.Version}/{computedHash}";
var manifestPath = $"cas://fixtures/{request.Component}/{request.Version}/{computedHash}/manifest";
return new StoredCallgraphArtifact(
Path: $"cas://fixtures/{request.Component}/{request.Version}/{request.FileName}",
Path: $"fixtures/{request.Component}/{request.Version}/{request.FileName}",
Length: bytes.Length,
Hash: computedHash,
ContentType: request.ContentType);
ContentType: request.ContentType,
CasUri: casUri,
ManifestPath: manifestPath,
ManifestCasUri: manifestPath);
}
}
private static string LocateRepoRoot()

View File

@@ -36,6 +36,10 @@ public sealed class RuntimeFactsIngestionServiceTests
{
SymbolId = "symbol::foo",
HitCount = 3,
ProcessId = 100,
ProcessName = "worker",
ContainerId = "ctr-1",
SocketAddress = "10.0.0.5:443",
Metadata = new Dictionary<string, string?> { ["thread"] = "main" }
},
new()
@@ -68,6 +72,8 @@ public sealed class RuntimeFactsIngestionServiceTests
repository.LastUpsert!.RuntimeFacts![0].SymbolId.Should().Be("symbol::bar");
repository.LastUpsert!.RuntimeFacts![0].HitCount.Should().Be(1);
repository.LastUpsert!.RuntimeFacts![1].SymbolId.Should().Be("symbol::foo");
repository.LastUpsert!.RuntimeFacts![1].ProcessId.Should().Be(100);
repository.LastUpsert!.RuntimeFacts![1].ContainerId.Should().Be("ctr-1");
repository.LastUpsert!.RuntimeFacts![1].HitCount.Should().Be(5);
repository.LastUpsert!.Metadata.Should().ContainKey("source");
}
@@ -95,8 +101,8 @@ public sealed class RuntimeFactsIngestionServiceTests
CallgraphId = "cg-new",
Events = new List<RuntimeFactEvent>
{
new() { SymbolId = "new::symbol", HitCount = 2 },
new() { SymbolId = "old::symbol", HitCount = 3, Metadata = new Dictionary<string, string?> { ["thread"] = "main" } }
new() { SymbolId = "new::symbol", HitCount = 2, ProcessName = "svc" },
new() { SymbolId = "old::symbol", HitCount = 3, ProcessId = 200, Metadata = new Dictionary<string, string?> { ["thread"] = "main" } }
}
};
@@ -107,6 +113,7 @@ public sealed class RuntimeFactsIngestionServiceTests
repository.LastUpsert!.RuntimeFacts![0].SymbolId.Should().Be("new::symbol");
repository.LastUpsert!.RuntimeFacts![1].SymbolId.Should().Be("old::symbol");
repository.LastUpsert!.RuntimeFacts![1].HitCount.Should().Be(4);
repository.LastUpsert!.RuntimeFacts![1].ProcessId.Should().Be(200);
repository.LastUpsert!.RuntimeFacts![1].Metadata.Should().ContainKey("thread").WhoseValue.Should().Be("main");
}

View File

@@ -15,9 +15,8 @@ public sealed class RuntimeFactsNdjsonReaderTests
public async Task ReadAsync_ParsesLines()
{
var ndjson = """
{"symbolId":"sym::foo","hitCount":2}
{"symbolId":"sym::foo","hitCount":2,"processId":10,"processName":"api"}
{"symbolId":"sym::bar","codeId":"elf:abcd","loaderBase":"0x1000","metadata":{"thread":"bg"}}
""";
await using var stream = new MemoryStream(Encoding.UTF8.GetBytes(ndjson));
@@ -25,6 +24,8 @@ public sealed class RuntimeFactsNdjsonReaderTests
events.Should().HaveCount(2);
events[0].SymbolId.Should().Be("sym::foo");
events[0].ProcessId.Should().Be(10);
events[0].ProcessName.Should().Be("api");
events[1].LoaderBase.Should().Be("0x1000");
}