Skip to content

feat(diagnostics): add safe SDK support report (#13) - #216

Open
woahwhattheheck wants to merge 10 commits into
Raegis-RWA:mainfrom
woahwhattheheck:sol56/raegis13-sdk-diagnostics-20261008-r1
Open

woahwhattheheck wants to merge 10 commits into
Raegis-RWA:mainfrom
woahwhattheheck:sol56/raegis13-sdk-diagnostics-20261008-r1

Conversation

@woahwhattheheck

Copy link
Copy Markdown

Closes #13

/claim #13

Summary

Adds a deterministic, redaction-first SDK diagnostics report for support and debugging without introducing a live RPC side effect.

  • exposes client.buildDiagnosticsReport(...) plus a standalone builder and public types;
  • reports environment/RPC/network/contract/signer configuration state without serializing raw RPC URLs, network passphrases, contract IDs, or signer material;
  • represents network state conservatively as not-checked unless a recent typed NetworkFailure is supplied, then reports degraded with the existing safe recovery diagnostic;
  • represents compliance-module readiness without claiming protocol whitelist state, KYC/AML completion, or legal eligibility;
  • sanitizes up to five recent network/configuration/unknown errors;
  • hardens the existing network diagnostic helper so even a manually-constructed NetworkFailure cannot inject an arbitrary raw message into support output;
  • documents the redaction boundary and support workflow in README, API reference, and docs/diagnostics-report.md;
  • adds four focused diagnostics regression cases.

Acceptance traceability

# Acceptance criterion Evidence
1 Diagnostics report type is implemented src/diagnostics/report.ts + public exports + AegisClient.buildDiagnosticsReport
2 Network and contract config state included report configuration.rpc, configuration.network, configuration.contract, plus conservative network.status
3 Compliance module readiness represented compliance.module, protocolState: not-checked, legalStatus: not-assessed
4 Sensitive values redacted raw URL/passphrase/contract ID/signer/raw errors never copied; typed errors mapped to fixed safe messages
5 Tests verify diagnostics output tests/diagnostics-report.test.ts has four focused cases covering config redaction, preset semantics, typed-error redaction, and five-error bound
6 Docs explain support usage docs/diagnostics-report.md, README section, API reference

Validation truth

Source branch was created from sponsor main at 69fff2c7e8c6fe801428fc1bb71d064c5c94949c; final pre-publication fence confirmed sponsor main still equals that SHA and issue #13 still had no PR cross-reference or @woah claim.

Connector readback reports 8 changed paths and branch head 3f7ced355d0f299dcde4623d209daf593ca72ccb, 10 commits ahead / 0 behind the base. A focused static source audit confirmed the report does not directly copy rpcUrl, networkPassphrase, contractId, or error.message, the client method/export are present, and the diagnostics doc contains both network and compliance boundaries.

The focused Jest cases were authored but not executed in this session because the cloud container could not resolve GitHub to materialize dependencies/source. No test-suite, build, CI, or runtime green result is claimed.

Compensation

I, @woahwhattheheck (GitHub ID 293286387), am the original contributor for this issue-scoped implementation and affirmatively request sponsor review, contributor credit, and any eligible GrantFox OSS / Official Campaign FWC26 compensation for issue #13. Please confirm assignment/eligibility, accepted scope, payable amount, and settlement route if applicable. The Maybe Rewarded label is conditional; no award or payment is asserted.

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.

Add SDK diagnostics report for support and debugging

1 participant