Files
clean-architecture-frontend…/tests
DongHyeonkaandClaude Opus 5.5 810849e496 fix(contracts): share one operationId and status-group grammar (R-7.5)
The V3 composition admits operationIds with /^[A-Za-z][A-Za-z0-9_.-]{0,127}$/
(camelCase, up to 128 chars), but telemetry validated operation_id with
/^[A-Z][A-Z0-9_]{0,63}$/, so api.request.failed for a V3 operation such as
`getUser` failed projection as invalid-attribute-value and was dropped.
Diagnostics used the free-form 64-char safe-string pattern instead.
http_status_group had the same split: statusGroup() emits [0-9]xx|none and
diagnostics accepted that, but telemetry only [1-5]xx|none, so a failure
with status 0 or >= 600 was dropped too.

- New src/contracts/operation-id.ts holds isOperationId (the V3 grammar);
  the V3 composition, telemetry operation_id and diagnostics operation_id
  all use it. The REST v2 and browser RPC registry grammars are subsets.
- isHttpStatusGroup sits next to statusGroup() in diagnostics.ts and is used
  by both diagnostics and telemetry.
Other telemetry attribute policies (route_id, error_kind, redaction) are
unchanged.

RED: "shared operationId and status-group grammar" failed before the fix:
getUser, users.v1.get-item and a 128-char id were rejected by telemetry;
"1getUser", "get:user", "get/user" were accepted by diagnostics; and the
statusGroup(0)/statusGroup(999) groups were rejected by telemetry.
Gates: check:architecture, check:types:app/test/node, lint, test:component,
test:runtime-schema, test:contract pass; test:unit passes except the
environment-dependent removal-fixture.test.ts (needs generated
artifacts/release files; unrelated). check:diagnostics,
check:registries:structure, check:types:web-worker/service-worker and
tests/integration, tests/platform/telemetry also pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:19:48 +09:00
..