Skip to content

test: add regression tests for observability and privacy features - #1586

Merged
1nonlypiece merged 1 commit into
Disciplr-Org:mainfrom
p70436464-prog:feature/observability-tests
Aug 30, 2026
Merged

1nonlypiece merged 1 commit into
Disciplr-Org:mainfrom
p70436464-prog:feature/observability-tests

Conversation

@p70436464-prog

Copy link
Copy Markdown
Contributor

Closes #1556

Description

Addresses the objective of establishing a durable regression contract for normal, boundary, accessibility, and compatibility behavior for the privacy-safe observability and tracing implementation.

Acceptance Criteria Satisfied:

  • The implementation defines and enforces the relevant invariants for normal and adversarial inputs.
  • Added focused unit and integration tests for success, failure, loading, empty, retry, and permission states.
  • Documented the supported API/component contract (via test suites acting as a regression contract) and protected existing consumers from accidental breaking changes.
  • Automated tests cover success, failure, boundary, retry, and permission behavior applicable to this feature.
  • N/A: Verify keyboard, focus, screen-reader, responsive, and reduced-motion behavior where the feature is interactive (these are backend utility middleware).

Validation Commands

  • Run npm test or node --experimental-vm-modules node_modules/jest/bin/jest.js src/middleware/privacy-logger.test.ts src/observability/tracing.test.ts src/observability/httpMetrics.test.ts to execute these specific tests.

Design Tradeoffs & Limitations

  • The middleware directly hooks into the res.on('finish') event, which is correct for logging and metrics but requires careful teardown and error handling logic, which we’ve explicitly tested.
  • IP masking and Redaction algorithms are built for speed and strict coverage but have known tradeoffs in identifying complex recursive shapes (partially mitigated by test assertions on cycle handling).

@1nonlypiece
1nonlypiece merged commit 3905a69 into Disciplr-Org:main Aug 30, 2026
5 of 7 checks passed
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.

[Quality][Medium] Improve privacy-safe observability and tracing: regression, accessibility, and compatibility coverage

2 participants