refactor: ScoreBreakdown struct fields → v2.1 names (deferred debt from cc4361f)#58
Open
ubercylon8 wants to merge 1 commit into
Open
refactor: ScoreBreakdown struct fields → v2.1 names (deferred debt from cc4361f)#58ubercylon8 wants to merge 1 commit into
ubercylon8 wants to merge 1 commit into
Conversation
…sions across 46 copies Resolves deferred technical debt from commits 237f2b1 (v2 rubric activation) and cc4361f (v2.1 rubric activation), both of which deferred renaming the ScoreBreakdown struct fields in test_logger.go due to sweep scope. Changes: - Rename 5 existing fields (v1 names → v2.1 sub-dimension names): RealWorldAccuracy → APIFidelity TechnicalSophistication → IdentifierFidelity SafetyMechanisms → TelemetrySignalQuality DetectionOpportunities → ExecutionContextFidelity LoggingObservability → SchemaMetadata - Add 3 new v2.1 structure sub-dimensions: DocumentationCompleteness (3b, 0–1.0) LoggingPlumbing (3c, 0–0.5) OperationalHygiene (3d, 0–0.5) - Propagated to all 48 per-test test_logger.go copies (10 cyber-hygiene, 28 intel-driven, 9 mitre-top10) via scripted sweep - Updated 35 test *.go files that initialise ScoreBreakdown{} with old field names; field values preserved (no re-scoring) - Updated TEMPLATE-UUID.go with v2.1-idiomatic defaults and comments - gofmt -l clean on all changed files - go vet failures on checked tests are all pre-existing (missing embedded binaries, missing platform files) — zero new errors Field mapping rationale for legacy v1/v2 tests is documented in docs/SCOREBREAKDOWN_FIELD_MIGRATION.md along with the consumer migration guide for ProjectAchilles and Elasticsearch. BREAKING CHANGE: JSON wire format of scoreBreakdown object changes. PA backend and ES consumers must update field readers before ingesting results from tests built after this commit. See migration guide. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> https://claude.ai/code/session_018D5p6BDpfPpCLu7YT97Nsj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves the
ScoreBreakdownstruct field rename that was explicitly deferred across two rubric activations:docs/PROPOSED_RUBRIC_V2.1_SIGNAL_QUALITY.md§"Deferred (out of scope for v2.1 activation)"This PR closes that debt by sweeping all 48 per-test
test_logger.gocopies + the canonical template + all 35 test*.gofiles that initialiseScoreBreakdown{}.Field Mapping
Renamed (5 fields)
RealWorldAccuracyrealWorldAccuracyAPIFidelityapiFidelityTechnicalSophisticationtechnicalSophisticationIdentifierFidelityidentifierFidelitySafetyMechanismssafetyMechanismsTelemetrySignalQualitytelemetrySignalQualityDetectionOpportunitiesdetectionOpportunitiesExecutionContextFidelityexecutionContextFidelityLoggingObservabilityloggingObservabilitySchemaMetadataschemaMetadataAdded (3 new fields)
DocumentationCompletenessdocumentationCompletenessLoggingPlumbingloggingPlumbingOperationalHygieneoperationalHygieneMapping rationale for legacy tests (v1/v2 — compilation only, no re-scoring)
Legacy tests preserve their existing numeric values; the field names are renamed to the closest semantic v2.1 equivalents. The three new fields default to
0.0. NoScoreorRubricVersionvalues were modified.Full rationale:
docs/SCOREBREAKDOWN_FIELD_MIGRATION.mdScope
test_logger.gostruct definition (all per-test copies + canonical template)*.gostruct initialisations (35 tests + TEMPLATE-UUID.go)docs/SCOREBREAKDOWN_FIELD_MIGRATION.md(new)gofmt -lclean on all changed files ✅go veterrors (all failures are pre-existing: missing embedded binaries, missing platform files)Consumer-side work needed before merge
scoreBreakdown.*change. Two consumers must be updated before results from post-merge builds are ingested:1. ProjectAchilles (
~/F0RT1KA/ProjectAchilles/)Both
backend/andbackend-serverless/must be updated in lockstep (they are mirrors — drift causes silent data drops):src/services/browser/metadataExtractor.ts— replace old regex extractions with new field namessrc/types/test.ts— rename fields inTestMetadata/TestDetails/ScoreBreakdowninterfacesrc/services/browser/testIndexer.ts— wire new fields through indexer pipelinesrc/services/agent/test-catalog.service.ts— update catalog persistence/lookupsrc/services/browser/__tests__/metadataExtractor.test.ts— update extraction testsDetailed code snippets in
docs/SCOREBREAKDOWN_FIELD_MIGRATION.md§"ProjectAchilles".2. Elasticsearch indices (
achilles-results-*)scoreBreakdown.realWorldAccuracy, etc.)testMetadata.rubricVersionReferences
docs/SCOREBREAKDOWN_FIELD_MIGRATION.md— full migration guidedocs/PROPOSED_RUBRIC_V2.1_SIGNAL_QUALITY.md— rubric spec (§"Deferred" section documents the debt this PR closes)Generated by Claude Code