Preprod readiness: wire contract circuits, link ledger parser, fix CVEs, add feature flags#56
Draft
Preprod readiness: wire contract circuits, link ledger parser, fix CVEs, add feature flags#56
Conversation
- npm audit fix: 27 → 8 vulnerabilities (fix flatted, glob, undici, vite, yaml, etc.) - Update react-router-dom 6.17.0 → 6.30.3 (both frontends) — fixes GHSA-2w69-qvjg-hvjx XSS - Remaining 8 are low/moderate with no available fix (elliptic transitive, esbuild dev-only) Agent-Logs-Url: https://github.com/SpyCrypto/AutoDiscovery/sessions/39c17a3b-b2c6-42a5-8a49-8f91b5f03888 Co-authored-by: SpyCrypto <[email protected]>
…rser - Add @autodiscovery/contract as workspace dep to frontend-realdeal - Create bytes-utils.ts with hexToBytes32, tierToNumber, categoryToNumber, etc. - Wire createNewCase in real-case.ts with chain mapping storage - Wire attestStepLevelCompliance in real-compliance.ts - Wire grantDocumentAccessToParticipant + revokeDocumentAccessFromParticipant in real-access-control.ts - Wire registerDocument in real-document.ts - Wire registerExpertWitness in real-expert-witness.ts - Wire verifyRulePackHashMatchesExpected in real-jurisdiction.ts - Replace heuristic string matching with DiscoveryCore.ledger() parser in both frontends - All write operations use wallet-guard pattern (graceful local-only fallback) Agent-Logs-Url: https://github.com/SpyCrypto/AutoDiscovery/sessions/39c17a3b-b2c6-42a5-8a49-8f91b5f03888 Co-authored-by: SpyCrypto <[email protected]>
…alue cast - Add VITE_FEATURE_AI, VITE_FEATURE_EMAIL_SAFETY, VITE_FEATURE_CONTACTS env vars - Gate AI provider methods to return safe defaults when disabled - Gate email safety checkRecipients to return safe defaults when disabled - Gate contacts getContactsByCaseId to return empty when disabled - Fix DiscoveryCore.ledger() TypeScript — cast raw indexer data via `as any` - Update both .env.realdeal files with all new config variables Agent-Logs-Url: https://github.com/SpyCrypto/AutoDiscovery/sessions/39c17a3b-b2c6-42a5-8a49-8f91b5f03888 Co-authored-by: SpyCrypto <[email protected]>
Copilot created this pull request from a session on behalf of
SpyCrypto
April 10, 2026 14:09
View session
SpyCrypto
approved these changes
Apr 10, 2026
SpyCrypto
approved these changes
Apr 10, 2026
SpyCrypto
approved these changes
Apr 10, 2026
SpyCrypto
approved these changes
Apr 10, 2026
SpyCrypto
approved these changes
Apr 10, 2026
Owner
|
@copilot resolve the merge conflicts in this pull request |
SpyCrypto
approved these changes
Apr 15, 2026
Resolve 9 merge conflicts: - frontend-realdeal/package.json: keep both sets of @midnight-ntwrk deps - frontend-realdeal/.env.realdeal: accept deletion (now gitignored) - 6 provider files: accept main's Phase 2 implementations (participantPublicKey, improved error messages, proper type casts) - discovery-core-reader.ts: accept main's _ledgerParser dynamic import pattern with heuristic fallback Co-authored-by: SpyCrypto <[email protected]>
Contributor
Author
Resolved all 9 merge conflicts in
All 39 frontend-realdeal tests pass, lint shows 0 errors. |
SpyCrypto
approved these changes
Apr 15, 2026
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.
Completes the contract integration layer so the codebase is ready for preprod deployment once contract addresses are populated.
Security: npm vulnerabilities (27 → 8, 0 critical/high)
npm audit fixresolves 19 transitive vulnerabilitiesreact-router-dom6.17.0 → 6.30.3 in both frontends (XSS via open redirect, GHSA-2w69-qvjg-hvjx)Link
@autodiscovery/contractledger parser into discovery-core-reader@autodiscovery/contract: "*"to frontend-realdealrawState.includes(id)string matching with typedDiscoveryCore.ledger()calls in both frontendsWire
callTx.*circuit calls in all 6 providerschain/bytes-utils.tswithhexToBytes32,tierToNumber,categoryToNumber,stringToBytes32createNewCase+ chain mapping storageattestStepLevelCompliancegrantDocumentAccessToParticipant,revokeDocumentAccessFromParticipantregisterDocumentregisterExpertWitnessverifyRulePackHashMatchesExpectedFeature flags for off-chain providers
VITE_FEATURE_AI,VITE_FEATURE_EMAIL_SAFETY,VITE_FEATURE_CONTACTS— defaulttrue, set"false"to disableStill requires manual action
VITE_CONTRACT_*env varsconfigureProviders()was already complete inmidnight-connection.ts— no changes needed