@@ -12,11 +12,11 @@ import { readQaScenarioPack, type QaSeedScenarioWithSource } from "./scenario-ca
1212import { readQaScorecardTaxonomyReport , type QaMaturityTaxonomy } from "./scorecard-taxonomy.js" ;
1313
1414const TEST_EXECUTABLE_CATEGORY_ID = "agent-runtime-and-provider-execution.agent-turn-execution" ;
15- const TEST_EXECUTABLE_COVERAGE_ID = "channels .dm" ;
15+ const TEST_EXECUTABLE_COVERAGE_ID = "agent-runtime-and-provider-execution .dm" ;
1616const TEST_BROWSER_CATEGORY_ID = "browser-control-ui-and-webchat.browser-ui" ;
17- const TEST_BROWSER_COVERAGE_ID = "ui. control" ;
18- const TEST_WEBCHAT_COVERAGE_ID = "ui .webchat" ;
19- const DOTTED_COVERAGE_ID_PATTERN = / ^ [ a - z 0 - 9 ] [ a - z 0 - 9 - ] * (?: \. [ a - z 0 - 9 ] [ a - z 0 - 9 - ] * ) + $ / ;
17+ const TEST_BROWSER_COVERAGE_ID = "browser-control-ui-and-webchat.gateway-hosted-ui- control" ;
18+ const TEST_WEBCHAT_COVERAGE_ID = "agent-runtime-and-provider-execution .webchat" ;
19+ const TWO_PART_COVERAGE_ID_PATTERN = / ^ [ a - z 0 - 9 ] [ a - z 0 - 9 - ] * \. [ a - z 0 - 9 ] [ a - z 0 - 9 - ] * $ / ;
2020
2121function buildQaScorecardTaxonomyReport ( params : {
2222 taxonomy : QaMaturityTaxonomy ;
@@ -35,7 +35,6 @@ function buildQaScorecardTaxonomyReport(params: {
3535function testMaturityTaxonomy ( params ?: {
3636 categoryId ?: string ;
3737 coverageIds ?: readonly string [ ] ;
38- featureCoverageIds ?: readonly ( readonly string [ ] ) [ ] ;
3938 includeAllCategories ?: boolean ;
4039 includeArchivedSurface ?: boolean ;
4140} ) : QaMaturityTaxonomy {
@@ -76,14 +75,9 @@ function testMaturityTaxonomy(params?: {
7675 category_note : "test-category.md" ,
7776 docs : [ ] ,
7877 search_anchors : [ ] ,
79- features : (
80- params ?. featureCoverageIds ??
81- ( params ?. coverageIds ?? [ TEST_EXECUTABLE_COVERAGE_ID ] ) . map ( ( coverageId ) => [
82- coverageId ,
83- ] )
84- ) . map ( ( coverageIds ) => ( {
85- name : coverageIds . join ( " + " ) ,
86- coverageIds : [ ...coverageIds ] ,
78+ features : ( params ?. coverageIds ?? [ TEST_EXECUTABLE_COVERAGE_ID ] ) . map ( ( coverageId ) => ( {
79+ name : coverageId ,
80+ coverageIds : [ coverageId ] ,
8781 } ) ) ,
8882 } ,
8983 ] ,
@@ -103,7 +97,12 @@ function testMaturityTaxonomy(params?: {
10397 category_note : "legacy-category.md" ,
10498 docs : [ ] ,
10599 search_anchors : [ ] ,
106- features : [ { name : "legacy.feature" , coverageIds : [ "legacy.feature" ] } ] ,
100+ features : [
101+ {
102+ name : "Legacy feature" ,
103+ coverageIds : [ "archived-surface.legacy-feature" ] ,
104+ } ,
105+ ] ,
107106 } ,
108107 ] ,
109108 } ,
@@ -215,7 +214,7 @@ describe("qa coverage report", () => {
215214 expect (
216215 inventory . scorecardTaxonomy . categories
217216 . flatMap ( ( category ) => category . coverageIds )
218- . every ( ( coverageId ) => DOTTED_COVERAGE_ID_PATTERN . test ( coverageId ) ) ,
217+ . every ( ( coverageId ) => TWO_PART_COVERAGE_ID_PATTERN . test ( coverageId ) ) ,
219218 ) . toBe ( true ) ;
220219 expect ( inventory . scorecardTaxonomy . validationIssues . length ) . toBeGreaterThan ( 0 ) ;
221220 expect (
@@ -247,16 +246,20 @@ describe("qa coverage report", () => {
247246 const observabilityPack = inventory . scenarioPacks . find ( ( pack ) => pack . id === "observability" ) ;
248247 expect ( personalPack ?. missingScenarioIds ) . toStrictEqual ( [ ] ) ;
249248 expect ( personalPack ?. scenarioIds ) . toContain ( "personal-share-safe-diagnostics-artifact" ) ;
250- expect ( personalPack ?. coverageIds ) . toContain ( "personal.redaction" ) ;
249+ expect ( personalPack ?. coverageIds ) . toContain (
250+ "security-auth-pairing-and-secrets.redaction-personal-redaction" ,
251+ ) ;
251252 expect ( observabilityPack ?. missingScenarioIds ) . toStrictEqual ( [ ] ) ;
252253 expect ( observabilityPack ?. scenarioIds ) . toEqual ( [ "otel-trace-smoke" , "docker-prometheus-smoke" ] ) ;
253- expect ( observabilityPack ?. coverageIds ) . toContain ( "telemetry.prometheus" ) ;
254+ expect ( observabilityPack ?. coverageIds ) . toContain (
255+ "telemetry-diagnostics-and-observability.prometheus-text-exposition" ,
256+ ) ;
254257 expect (
255258 expectDefined ( inventory . byTheme . memory , "memory QA theme" ) . map ( ( coverage ) => coverage . id ) ,
256- ) . toContain ( "memory. recall" ) ;
259+ ) . toContain ( "session- memory-and-context-engine.memory-search-and-store-tools- recall" ) ;
257260 expect (
258261 expectDefined ( inventory . bySurface . memory , "memory QA surface" ) . map ( ( coverage ) => coverage . id ) ,
259- ) . toContain ( "memory. recall" ) ;
262+ ) . toContain ( "session- memory-and-context-engine.memory-search-and-store-tools- recall" ) ;
260263 } ) ;
261264
262265 it ( "rejects duplicate ownership across YAML and non-YAML catalogs" , ( ) => {
@@ -288,7 +291,7 @@ describe("qa coverage report", () => {
288291 expect ( report ) . toContain ( "# QA Coverage Inventory" ) ;
289292 expect ( report ) . toContain ( "- Missing coverage metadata: 0" ) ;
290293 expect ( report ) . toContain ( "- Overlapping coverage IDs:" ) ;
291- expect ( report ) . toContain ( "memory. recall" ) ;
294+ expect ( report ) . toContain ( "session- memory-and-context-engine.embedding-search- recall" ) ;
292295 expect ( report ) . toContain ( "primary: memory-recall (qa/scenarios/memory/memory-recall.yaml)" ) ;
293296 expect ( report ) . toContain ( "secondary: active-memory-preprompt-recall" ) ;
294297 expect ( report ) . toContain ( "## Scenario Packs" ) ;
@@ -307,9 +310,11 @@ describe("qa coverage report", () => {
307310 expect ( report ) . toContain ( "- Inventory refs:" ) ;
308311 expect ( report ) . toContain ( "- Scenario coverage IDs:" ) ;
309312 expect ( report ) . toContain (
310- "- browser-automation-and-exec-sandbox-tools.tool-invocation-and-execution (browser-automation-and-exec-sandbox-tools / Tool Invocation and Execution; partial): profiles: all, release, smoke-ci; coverage IDs:" ,
313+ "- browser-automation-and-exec-sandbox-tools.tool-invocation-and-execution (browser-automation-and-exec-sandbox-tools / Tool Invocation and Execution; partial): profiles: all, release; coverage IDs:" ,
314+ ) ;
315+ expect ( report ) . toContain (
316+ "primary:playwright:ui/src/e2e/chat-flow.e2e.test.ts (browser-control-ui-and-webchat.gateway-hosted-ui-control)" ,
311317 ) ;
312- expect ( report ) . toContain ( "primary:playwright:ui/src/e2e/chat-flow.e2e.test.ts (ui.control)" ) ;
313318 expect ( report ) . not . toContain ( "### Unknown Scenario Coverage IDs" ) ;
314319 } ) ;
315320
@@ -497,7 +502,7 @@ describe("qa coverage report", () => {
497502 it ( "counts partial coverage IDs proportionately for taxonomy inventory" , ( ) => {
498503 const report = buildQaScorecardTaxonomyReport ( {
499504 taxonomy : testMaturityTaxonomy ( {
500- featureCoverageIds : [ [ TEST_EXECUTABLE_COVERAGE_ID , TEST_WEBCHAT_COVERAGE_ID ] ] ,
505+ coverageIds : [ TEST_EXECUTABLE_COVERAGE_ID , TEST_WEBCHAT_COVERAGE_ID ] ,
501506 } ) ,
502507 repoRoot : process . cwd ( ) ,
503508 scenarios : [
@@ -525,7 +530,7 @@ describe("qa coverage report", () => {
525530 ) ;
526531 } ) ;
527532
528- it ( "counts each required taxonomy coverage ID once across categories " , ( ) => {
533+ it ( "rejects one coverage ID assigned to different exact features " , ( ) => {
529534 const taxonomy : QaMaturityTaxonomy = {
530535 ...testMaturityTaxonomy ( ) ,
531536 profiles : [
@@ -534,10 +539,7 @@ describe("qa coverage report", () => {
534539 description : "Test release profile." ,
535540 includeAllCategories : false ,
536541 channelDriver : "qa-channel" ,
537- categoryIds : [
538- "agent-runtime-and-provider-execution.agent-turn-execution" ,
539- "agent-runtime-and-provider-execution.tool-execution-controls" ,
540- ] ,
542+ categoryIds : [ "agent-runtime-and-provider-execution.agent-turn-execution" ] ,
541543 } ,
542544 ] ,
543545 surfaces : [
@@ -555,18 +557,9 @@ describe("qa coverage report", () => {
555557 search_anchors : [ ] ,
556558 features : [
557559 {
558- name : "shared plus unique " ,
559- coverageIds : [ TEST_EXECUTABLE_COVERAGE_ID , TEST_WEBCHAT_COVERAGE_ID ] ,
560+ name : "shared" ,
561+ coverageIds : [ TEST_EXECUTABLE_COVERAGE_ID ] ,
560562 } ,
561- ] ,
562- } ,
563- {
564- id : "tool-execution-controls" ,
565- name : "Tool Execution Controls" ,
566- category_note : "tool-execution-controls.md" ,
567- docs : [ ] ,
568- search_anchors : [ ] ,
569- features : [
570563 {
571564 name : "shared" ,
572565 coverageIds : [ TEST_EXECUTABLE_COVERAGE_ID ] ,
@@ -577,21 +570,40 @@ describe("qa coverage report", () => {
577570 } ,
578571 ] ,
579572 } ;
580- const report = buildQaScorecardTaxonomyReport ( {
581- taxonomy,
582- repoRoot : process . cwd ( ) ,
583- scenarios : [
584- scenarioWithCoverage ( {
585- primary : [ TEST_EXECUTABLE_COVERAGE_ID ] ,
586- secondary : [ TEST_WEBCHAT_COVERAGE_ID ] ,
587- sourcePath : "qa/scenarios/channels/dm-chat-baseline.yaml" ,
588- } ) ,
589- ] ,
590- } ) ;
573+ expect ( ( ) =>
574+ buildQaScorecardTaxonomyReport ( {
575+ taxonomy,
576+ repoRoot : process . cwd ( ) ,
577+ scenarios : [ ] ,
578+ } ) ,
579+ ) . toThrow (
580+ `coverage ID ${ TEST_EXECUTABLE_COVERAGE_ID } already belongs to agent-runtime-and-provider-execution.agent-turn-execution feature shared; coverage IDs must identify exactly one taxonomy feature` ,
581+ ) ;
582+ } ) ;
591583
592- expect ( report . requiredCoverageIdCount ) . toBe ( 2 ) ;
593- expect ( report . inventoriedCoverageIdCount ) . toBe ( 1 ) ;
594- expect ( report . coverageIdInventoryPercent ) . toBe ( 50 ) ;
584+ it ( "requires one two-part ID owned by each exact taxonomy feature" , ( ) => {
585+ const taxonomy = testMaturityTaxonomy ( ) ;
586+ const feature = expectDefined (
587+ taxonomy . surfaces [ 0 ] ?. categories [ 0 ] ?. features [ 0 ] ,
588+ "test taxonomy feature" ,
589+ ) ;
590+ feature . coverageIds = [ TEST_EXECUTABLE_COVERAGE_ID , TEST_WEBCHAT_COVERAGE_ID ] ;
591+
592+ expect ( ( ) =>
593+ buildQaScorecardTaxonomyReport ( { taxonomy, repoRoot : process . cwd ( ) , scenarios : [ ] } ) ,
594+ ) . toThrow ( "taxonomy features must define exactly one coverage ID" ) ;
595+
596+ feature . coverageIds = [ "agent-runtime-and-provider-execution.delivery.group" ] ;
597+ expect ( ( ) =>
598+ buildQaScorecardTaxonomyReport ( { taxonomy, repoRoot : process . cwd ( ) , scenarios : [ ] } ) ,
599+ ) . toThrow ( "coverage ids must use exactly <surface-id>.<feature-id>" ) ;
600+
601+ feature . coverageIds = [ TEST_BROWSER_COVERAGE_ID ] ;
602+ expect ( ( ) =>
603+ buildQaScorecardTaxonomyReport ( { taxonomy, repoRoot : process . cwd ( ) , scenarios : [ ] } ) ,
604+ ) . toThrow (
605+ `coverage ID ${ TEST_BROWSER_COVERAGE_ID } must belong to surface agent-runtime-and-provider-execution` ,
606+ ) ;
595607 } ) ;
596608
597609 it ( "inventories script producer declarations" , ( ) => {
0 commit comments