Repair live AdvisoryAI search corpus parity
This commit is contained in:
@@ -23,12 +23,71 @@
|
||||
<ItemGroup>
|
||||
<None Update="KnowledgeSearch/doctor-search-seed.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>src/AdvisoryAI/StellaOps.AdvisoryAI/KnowledgeSearch/doctor-search-seed.json</TargetPath>
|
||||
</None>
|
||||
<None Update="KnowledgeSearch/doctor-search-seed.de.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>src/AdvisoryAI/StellaOps.AdvisoryAI/KnowledgeSearch/doctor-search-seed.de.json</TargetPath>
|
||||
</None>
|
||||
<None Update="KnowledgeSearch/doctor-search-seed.fr.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>src/AdvisoryAI/StellaOps.AdvisoryAI/KnowledgeSearch/doctor-search-seed.fr.json</TargetPath>
|
||||
</None>
|
||||
<None Update="KnowledgeSearch/doctor-search-controls.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>src/AdvisoryAI/StellaOps.AdvisoryAI/KnowledgeSearch/doctor-search-controls.json</TargetPath>
|
||||
</None>
|
||||
<None Update="KnowledgeSearch/knowledge-docs-allowlist.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>src/AdvisoryAI/StellaOps.AdvisoryAI/KnowledgeSearch/knowledge-docs-allowlist.json</TargetPath>
|
||||
</None>
|
||||
<None Update="KnowledgeSearch/knowledge-docs-manifest.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>src/AdvisoryAI/StellaOps.AdvisoryAI/KnowledgeSearch/knowledge-docs-manifest.json</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\devops\compose\openapi_current.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>devops/compose/openapi_current.json</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\README.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/README.md</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\INSTALL_GUIDE.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/INSTALL_GUIDE.md</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\modules\advisory-ai\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/modules/advisory-ai/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\modules\authority\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/modules/authority/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\modules\cli\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/modules/cli/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\modules\platform\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/modules/platform/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\modules\policy\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/modules/policy/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\modules\router\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/modules/router/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\modules\scanner\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/modules/scanner/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Include="..\..\..\docs\operations\**\*.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<TargetPath>docs/operations/%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
</None>
|
||||
<None Update="models/all-MiniLM-L6-v2.onnx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
||||
@@ -220,6 +220,7 @@ curl -X POST http://127.0.0.1:10451/v1/search/index/rebuild \
|
||||
Notes:
|
||||
- `stella advisoryai sources prepare` needs `STELLAOPS_BACKEND_URL` or equivalent CLI config when it performs live Doctor discovery. If you only need local search verification and the checked-in Doctor seed/control files are sufficient, the HTTP-only rebuild path is valid.
|
||||
- `stella advisoryai index rebuild` and `stella search index rebuild` call authenticated backend endpoints. In the local live-search test lane above, use direct HTTP requests with explicit `X-StellaOps-*` headers unless you already have an authenticated CLI session.
|
||||
- Compose/runtime note: the `stellaops/advisory-ai-web:dev` image must publish a repo-shaped search corpus under `/app` (`docs/**`, `devops/compose/openapi_current.json`, and `src/AdvisoryAI/StellaOps.AdvisoryAI/KnowledgeSearch/*.json`). Without those assets, compose rebuilds report zero knowledge/API/Doctor counts and the browser shell can only search whatever unified rows were already persisted.
|
||||
- Current live verification coverage includes the Doctor/knowledge query `database connectivity`, which returns `contextAnswer.status = grounded` plus citations after the rebuild sequence above.
|
||||
|
||||
Migration files (all idempotent, safe to re-run):
|
||||
|
||||
@@ -40,6 +40,21 @@ public sealed class KnowledgeSearchRepositoryRootResolverTests
|
||||
Assert.NotEqual("configured", resolution.Source);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Resolve_accepts_runtime_publish_layout_when_app_base_contains_repo_shaped_corpus()
|
||||
{
|
||||
using var fixture = RuntimePublishLayoutFixture.Create();
|
||||
var options = new KnowledgeSearchOptions();
|
||||
|
||||
var resolution = KnowledgeSearchRepositoryRootResolver.Resolve(
|
||||
options,
|
||||
fixture.AppBaseDirectory,
|
||||
fixture.AppBaseDirectory);
|
||||
|
||||
Assert.True(resolution.Validated);
|
||||
Assert.Equal(fixture.AppBaseDirectory, resolution.Path);
|
||||
}
|
||||
|
||||
private sealed class RepositoryRootFixture : IDisposable
|
||||
{
|
||||
private RepositoryRootFixture(
|
||||
@@ -99,4 +114,50 @@ public sealed class KnowledgeSearchRepositoryRootResolverTests
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class RuntimePublishLayoutFixture : IDisposable
|
||||
{
|
||||
private RuntimePublishLayoutFixture(string workspaceRoot, string appBaseDirectory)
|
||||
{
|
||||
WorkspaceRoot = workspaceRoot;
|
||||
AppBaseDirectory = appBaseDirectory;
|
||||
}
|
||||
|
||||
public string WorkspaceRoot { get; }
|
||||
|
||||
public string AppBaseDirectory { get; }
|
||||
|
||||
public static RuntimePublishLayoutFixture Create()
|
||||
{
|
||||
var workspaceRoot = Path.Combine(Path.GetTempPath(), "stellaops-knowledge-runtime-" + Guid.NewGuid().ToString("N"));
|
||||
var appBaseDirectory = Path.Combine(workspaceRoot, "app");
|
||||
|
||||
Directory.CreateDirectory(Path.Combine(appBaseDirectory, "docs", "modules", "advisory-ai"));
|
||||
Directory.CreateDirectory(Path.Combine(appBaseDirectory, "devops", "compose"));
|
||||
Directory.CreateDirectory(Path.Combine(appBaseDirectory, "src", "AdvisoryAI", "StellaOps.AdvisoryAI", "KnowledgeSearch"));
|
||||
|
||||
File.WriteAllText(Path.Combine(appBaseDirectory, "docs", "README.md"), "# docs");
|
||||
File.WriteAllText(Path.Combine(appBaseDirectory, "docs", "modules", "advisory-ai", "knowledge-search.md"), "# advisory");
|
||||
File.WriteAllText(Path.Combine(appBaseDirectory, "devops", "compose", "openapi_current.json"), "{}");
|
||||
File.WriteAllText(
|
||||
Path.Combine(appBaseDirectory, "src", "AdvisoryAI", "StellaOps.AdvisoryAI", "KnowledgeSearch", "knowledge-docs-allowlist.json"),
|
||||
"{ \"include\": [\"docs/modules/advisory-ai\"] }");
|
||||
File.WriteAllText(
|
||||
Path.Combine(appBaseDirectory, "src", "AdvisoryAI", "StellaOps.AdvisoryAI", "KnowledgeSearch", "doctor-search-seed.json"),
|
||||
"[]");
|
||||
File.WriteAllText(
|
||||
Path.Combine(appBaseDirectory, "src", "AdvisoryAI", "StellaOps.AdvisoryAI", "KnowledgeSearch", "doctor-search-controls.json"),
|
||||
"[]");
|
||||
|
||||
return new RuntimePublishLayoutFixture(workspaceRoot, appBaseDirectory);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (Directory.Exists(WorkspaceRoot))
|
||||
{
|
||||
Directory.Delete(WorkspaceRoot, recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user