prep docs and service updates
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled

This commit is contained in:
master
2025-11-21 06:56:36 +00:00
parent ca35db9ef4
commit d519782a8f
242 changed files with 17293 additions and 13367 deletions

View File

@@ -10,7 +10,10 @@
- `docs/07_HIGH_LEVEL_ARCHITECTURE.md`
- `docs/modules/platform/architecture-overview.md`
- `docs/modules/scanner/architecture.md`
- Current sprint file (e.g., `docs/implplan/SPRINT_0131_0001_0001_scanner_surface.md`).
- `docs/reachability/DELIVERY_GUIDE.md` (sections 5.55.9 for native/JS/PHP updates)
- `docs/reachability/purl-resolved-edges.md`
- `docs/reachability/patch-oracles.md`
- Current sprint file (e.g., `docs/implplan/SPRINT_401_reachability_evidence_chain.md`).
## Working Directory & Boundaries
- Primary scope: `src/Scanner/**` (analyzers, worker, web service, plugins, __Libraries, __Tests, __Benchmarks, docs).
@@ -23,6 +26,8 @@
- Determinism: stable ordering, UTC ISO-8601 timestamps, no `DateTime.Now`/random without seed; normalize path separators.
- Logging: structured (`ILogger` message templates); avoid secrets/paths leakage.
- Security: no executing untrusted payloads; keep analyzers pure; include redaction guidance for runtime capture adapters.
- Native analyzers: capture `.note.gnu.build-id` when present and thread into `SymbolID`/`code_id`; add synthetic roots for `.preinit_array/.init_array/_init`; emit purl+symbol-digest on call edges; emit Unknowns when symbol→purl or edges are unresolved.
- Tests: keep patch-oracle fixtures deterministic (strip binaries; stable compilers); add/maintain `tests/reachability/patch-oracles/**` when touching native analyzers.
## Testing & Verification
- Default: `dotnet test src/Scanner/StellaOps.Scanner.sln`.

View File

@@ -9,8 +9,7 @@
"__Libraries/StellaOps.Scanner.Analyzers.Lang.Rust/StellaOps.Scanner.Analyzers.Lang.Rust.csproj",
"__Libraries/StellaOps.Scanner.Core/StellaOps.Scanner.Core.csproj",
"__Tests/StellaOps.Scanner.Analyzers.Lang.Tests/StellaOps.Scanner.Analyzers.Lang.Tests.csproj",
"__Tests/StellaOps.Scanner.Analyzers.Lang.Node.Tests/StellaOps.Scanner.Analyzers.Lang.Node.Tests.csproj",
"../Concelier/__Libraries/StellaOps.Concelier.Testing/StellaOps.Concelier.Testing.csproj"
"__Tests/StellaOps.Scanner.Analyzers.Lang.Node.Tests/StellaOps.Scanner.Analyzers.Lang.Node.Tests.csproj"
]
}
}

View File

@@ -2,6 +2,7 @@ using System.Text.Json;
using System.Text.Json.Nodes;
using Esprima;
using Esprima.Ast;
using EsprimaNode = Esprima.Ast.Node;
namespace StellaOps.Scanner.Analyzers.Lang.Node.Internal;
@@ -37,7 +38,7 @@ internal static class NodeImportWalker
: edges.OrderBy(e => e.ComparisonKey, StringComparer.Ordinal).ToArray();
}
private static void Walk(Node node, string sourcePath, List<NodeImportEdge> edges)
private static void Walk(EsprimaNode node, string sourcePath, List<NodeImportEdge> edges)
{
switch (node)
{

View File

@@ -426,12 +426,6 @@ internal static class NodePackageCollector
return $"{entry.Source}:{entry.Locator}";
}
private static bool HasYarnPnp(string rootPath)
{
return File.Exists(Path.Combine(rootPath, ".pnp.cjs"))
|| File.Exists(Path.Combine(rootPath, ".pnp.data.cjs"));
}
private static NodePackage? TryCreatePackage(
LanguageAnalyzerContext context,
string packageJsonPath,

View File

@@ -5,7 +5,7 @@ using System.IO;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using StellaOps.Scanner.Analyzers.Lang.Core;
using StellaOps.Scanner.Analyzers.Lang;
namespace StellaOps.Scanner.Analyzers.Lang.Node.Internal.Phase22;

View File

@@ -8,13 +8,17 @@
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\\*.cs" Exclude="obj\\**;bin\\**" />
<EmbeddedResource Include="**\\*.json" Exclude="obj\\**;bin\\**" />
<None Include="**\\*" Exclude="**\\*.cs;**\\*.json;bin\\**;obj\\**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StellaOps.Scanner.Analyzers.Lang\StellaOps.Scanner.Analyzers.Lang.csproj" />
</ItemGroup>
</Project>
<ItemGroup>
<Compile Include="**\\*.cs" Exclude="obj\\**;bin\\**" />
<EmbeddedResource Include="**\\*.json" Exclude="obj\\**;bin\\**" />
<None Include="**\\*" Exclude="**\\*.cs;**\\*.json;bin\\**;obj\\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Esprima" Version="3.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StellaOps.Scanner.Analyzers.Lang\StellaOps.Scanner.Analyzers.Lang.csproj" />
</ItemGroup>
</Project>

View File

@@ -7,6 +7,9 @@
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<UseConcelierTestInfra>false</UseConcelierTestInfra>
<ConcelierTestingPath></ConcelierTestingPath>
<ConcelierSharedTestsPath></ConcelierSharedTestsPath>
</PropertyGroup>
<ItemGroup>
@@ -43,4 +46,4 @@
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
</Project>
</Project>

View File

@@ -8,6 +8,9 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<UseConcelierTestInfra>false</UseConcelierTestInfra>
<ConcelierTestingPath></ConcelierTestingPath>
<ConcelierSharedTestsPath></ConcelierSharedTestsPath>
</PropertyGroup>
<ItemGroup>

View File

@@ -5,11 +5,13 @@
<MaxCpuCount>1</MaxCpuCount>
<TargetPlatform>x64</TargetPlatform>
<TargetFrameworkVersion>net10.0</TargetFrameworkVersion>
<ResultsDirectory>./TestResults</ResultsDirectory>
<ResultsDirectory>./TestResults/node-isolated</ResultsDirectory>
<TestCaseFilter>FullyQualifiedName~Lang.Node.Tests</TestCaseFilter>
</RunConfiguration>
<DataCollectionRunSettings>
<DataCollectors>
<!-- keep deterministic runs; no code coverage collectors by default -->
<DataCollector friendlyName="blame" enabled="false" />
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>

View File

@@ -13,10 +13,17 @@ dotnet restore src/Scanner/StellaOps.Scanner.Node.slnf \
-p:RestorePackagesPath="$REPO_ROOT/offline/packages" \
-p:ContinuousIntegrationBuild=true
# Run node analyzer tests in isolation
# Run node analyzer tests in isolation (minimal logging)
if [ "${CLEAN_BEFORE_NODE_TESTS:-0}" = "1" ] && [ -x "$REPO_ROOT/scripts/cleanup-runner-space.sh" ]; then
echo "[node-tests-isolated] Running cleanup to reclaim disk space..."
"$REPO_ROOT/scripts/cleanup-runner-space.sh"
fi
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 \
DOTNET_CLI_TELEMETRY_OPTOUT=1 \
NUGET_PACKAGES="$REPO_ROOT/offline/packages" \
dotnet test src/Scanner/StellaOps.Scanner.Node.slnf \
--no-build \
--settings "$REPO_ROOT/__Tests/node-isolated.runsettings" \
--no-restore \
--settings "$REPO_ROOT/src/Scanner/__Tests/node-isolated.runsettings" \
--logger "console;verbosity=minimal" \
/m:1