Skip to content

chore: add spec traceability comments across all 17 formal-requirement specs#344

Closed
aaron-zeisler wants to merge 16 commits into
feat/fdv2from
aaronz/spec-traceability-comments
Closed

chore: add spec traceability comments across all 17 formal-requirement specs#344
aaron-zeisler wants to merge 16 commits into
feat/fdv2from
aaronz/spec-traceability-comments

Conversation

@aaron-zeisler

@aaron-zeisler aaron-zeisler commented May 20, 2026

Copy link
Copy Markdown

Summary

Add spec-requirement traceability comments across all SDK specs that have both formal requirements and corresponding tests in the sdk-test-harness. Each test function or YAML fixture gets a compact // SPEC_ID X.Y.Z: short summary (Go) or # SPEC_ID X.Y.Z: short summary (YAML) annotation linking it to the spec requirement it exercises.

Requirement IDs are aligned with the latest sdk-specs main (post sdk-summit merge).

Specs covered (17 total)

Original 12 specs:

  • HOOK, MIGRATIONS, ATREF, BIGSEG, DATASYSTEM v2, PS, ENVFILTER, CSPE, CSSE, EVENTS, CSFDV2, FLGEA

Added in this update (5 new/newly-formalized specs):

  • AUTOENVATTR (17 formal requirements)
  • FLGMES (25 formal requirements, newly formalized from narrative)
  • FLGEDETAIL (14 formal requirements, new spec)
  • CONTEXT (57 formal requirements, rewritten from narrative)
  • CTXBLD (45 formal requirements, new spec)

Changes

  • 49 files modified across sdktests/ (Go) and data/data-files/ (YAML)
  • ~351 lines added (comment annotations only)
  • No behavioral changes to any test
  • FLGEA YAML comments refined to reference new sub-requirement IDs (1.6.2.9, 1.6.3.3)
  • Existing descriptive prose comments on DATASYSTEM directive tests preserved alongside new annotations

Follow-up work

Untested spec requirements are tracked in Jira epic SDK-2384 with 23 stories:

  • 6 stories for partially-covered specs (specific untested requirements listed)
  • 17 stories for specs with formal requirements but no harness test coverage

Test plan

  • Verify Go files compile (go build ./...)
  • Verify YAML files parse correctly (harness test run)
  • Spot-check comment accuracy against sdk-specs main
  • Confirm no "Untested requirements" block comments remain

via LD Research 🤖


Note

Low Risk
Low risk: changes are comment-only annotations in Go tests and YAML fixtures with no functional logic modifications.

Overview
Adds spec requirement traceability annotations across client/server evaluation YAML fixtures and many sdktests/* functions, linking each test/fixture to specific requirement IDs (e.g., FLGEA, FLGEDETAIL, CONTEXT, CTXBLD, HOOK, MIGRATIONS, DATASYSTEM, EVENTS, etc.).

Also adds a brief header comment block in common_tests_events_request.go documenting how EVENTS schema conformance is covered behaviorally versus via JSON Schema validation.

Reviewed by Cursor Bugbot for commit 145ab1d. Bugbot is set up for automated code reviews on this repo. Configure here.

@aaron-zeisler aaron-zeisler requested a review from a team as a code owner May 20, 2026 23:56
@aaron-zeisler

Copy link
Copy Markdown
Author

TODO: Redo using the latest branch that includes changes to the requirement numbers

aaron-zeisler and others added 15 commits May 21, 2026 09:33
Map test functions in common_tests_hooks.go to their corresponding
HOOK spec requirements (1.2.x, 1.3.x, 1.6.x). Normalizes the existing
1.3.7 comment to the new SPEC_ID X.Y.Z format and documents untested
requirements (identify series, config handlers, hook interface).

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Map test functions in server_side_migrations.go to their corresponding
MIGRATIONS spec requirements (1.1.x, 1.2.x, 1.3.x, 1.5). Documents
coverage of MigrationVariation, Migrator read/write, tracking
(invoked, latency, errors, consistency), and sampling.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add file-level comments to attribute-references.yml (ATREF 1.2.1-1.2.3)
and errors-bad-attribute-reference.yml (ATREF 1.1.1) mapping evaluations
to their corresponding spec requirements.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Map test functions in server_side_big_segments.go to their corresponding
BIGSEG spec requirements covering evaluation integration (1.9.x),
membership caching (1.6.x, 1.9.5.x), status polling (1.8.x),
context key hashing (1.3.x), and error handling (1.5.x).

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Normalize existing requirement references in FDv1 fallback tests to the
DATASYSTEM X.Y.Z format and add comments to initialization, reconnection,
state management, error handling, and update processing functions.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…files

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…files

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…-requirements

Co-authored-by: Cursor <cursoragent@cursor.com>
@aaron-zeisler aaron-zeisler force-pushed the aaronz/spec-traceability-comments branch from 034f4e2 to e50b854 Compare May 21, 2026 16:43
@aaron-zeisler aaron-zeisler changed the title chore: add spec traceability comments across all 12 formal-requirement specs chore: add spec traceability comments across all 17 formal-requirement specs May 21, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@aaron-zeisler aaron-zeisler force-pushed the aaronz/spec-traceability-comments branch from e50b854 to 145ab1d Compare May 21, 2026 17:00
@aaron-zeisler

Copy link
Copy Markdown
Author

Closed because t.Specification() is preferred: #345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant