Files
git.stella-ops.org/docs/features/checked/concelier/concelier-advisory-chunks-api.md
2026-02-13 02:04:55 +02:00

2.1 KiB

Concelier Advisory Chunks API (Paragraph-Anchored)

Module

Concelier

Status

VERIFIED

Description

REST API endpoint serving paragraph-anchored advisory chunks with tenant enforcement, AdvisoryRead scopes, and filters for sections/formats/limits/minLength. Designed for Advisory AI to pull deterministic paragraph anchors plus source metadata.

Implementation Details

  • Modules: src/Concelier/StellaOps.Concelier.WebService/
  • Key Classes:
    • AdvisoryChunkBuilder (src/Concelier/StellaOps.Concelier.WebService/Services/AdvisoryChunkBuilder.cs) - builds paragraph-anchored chunks from advisory content
    • AdvisoryChunkCache (src/Concelier/StellaOps.Concelier.WebService/Services/AdvisoryChunkCache.cs) - in-memory cache for advisory chunks
    • MessagingAdvisoryChunkCache (src/Concelier/StellaOps.Concelier.WebService/Services/MessagingAdvisoryChunkCache.cs) - messaging-backed cache implementation
    • AdvisoryChunkOptions (src/Concelier/StellaOps.Concelier.WebService/Options/ConcelierOptions.cs) - configuration for chunk sizes, limits, and formats
  • Interfaces: IAdvisoryChunkCache
  • Source: 2025-11-07-concelier-advisory-chunks.md

E2E Test Plan

  • Call the advisory chunks endpoint with a valid advisory ID and verify paragraph-anchored chunks are returned
  • Verify tenant enforcement: request chunks without AdvisoryRead scope and confirm 403 response
  • Verify section filter: request only specific sections and confirm only matching chunks are returned
  • Verify minLength filter: set minLength and confirm short paragraphs are excluded
  • Verify caching: request same advisory chunks twice and confirm second response is served from cache

Verification

  • Run ID: run-001
  • Date: 2026-02-13
  • Result: PASS - WebService.Tests 215/215 passed. 5 targeted tests across AdvisoryChunkBuilderTests (2) and AdvisoryChunkCacheKeyTests (3) verify paragraph-anchored chunk creation with SHA256 chunk IDs, JSON pointer field masks, fallback behavior, and deterministic cache key generation with normalized ordering and content-hash sensitivity.