Repository navigation
fix!: simplify setup and secure auth, storage, and job recovery - #124
Draft
Winter-Soren wants to merge 8 commits into
Draft
Winter-Soren wants to merge 8 commits into
Winter-Soren wants to merge 8 commits into
Conversation
Use one native dotenv path and Mongo target across services. Keep optional Bedrock lazy, move chemistry into an explicit pharma extra, package runtime assets, and align the Compose topology with the API and peer listeners. Enforce legacy chat/pharma ownership, offload synchronous finance work, reconcile this coordinator's interrupted jobs, and preserve runtime data when startup ports are busy. Keep merged optional integrations available. Validation: 1,198 backend tests passed, 114 live/optional tests skipped; Toju 4 tests passed; uv lock check and packaging smoke checks passed. Docker and the unavailable AWS host were not exercised. BREAKING CHANGE: Preserve QB2_MONGODB_DATABASE explicitly and configure the selected Mongo target. Install chemistry with --extra pharma; replace the removed dev extra with the default dependency group. Legacy chat/pharma clients must authenticate and own their records. Deploy a matching auth bridge secret on both servers. Compose uses fixed internal API/peer paths and optional storage profiles; run-clean no longer deletes runtime data. See documentations/guides/audit-cleanup-migration.md before upgrading.
Move Pinata and Lighthouse uploads behind authenticated server routes and forward signed session identity to run, chat, and pharma backends. Preserve provider choices and legacy pin metadata while preventing shared-account permanent deletion through the API. Recover form loading state after auth failures, return bounded JSON errors, retry rejected Mongo connections, and surface OTP provider failures. Start Helia on demand without deleting local content after a timeout. Validation: isolated frontend tests, TypeScript, source lint and synthetic production build pass. Real provider and wallet calls remain unverified. BREAKING CHANGE: Rename NEXT_PUBLIC_PINATA_JWT to PINATA_JWT and NEXT_PUBLIC_LIGHTHOUSE_KEY to LIGHTHOUSE_API_KEY, then rebuild and rotate previously exposed keys. Uploads require sign-in; permanent deletion now returns 409 and requires the provider dashboard. Run/chat/pharma proxies require matching backend ownership and bridge configuration. Preserve the auth database with MONGODB_DB_NAME. See the migration guide for rollout.
Derive local display state from its inputs, retain bounded pharma history, reject stale vault enrichment responses, and hydrate provider preferences without synchronous effect updates. Resolve promised vault route params with React use instead of unsupported async client components. Exclude only the upstream Mol* bundle from ESLint; keep source rules active. Add focused rendering/route tests and preserve existing integration code. Validation: full source lint has zero errors (17 existing warnings), TypeScript and production build pass; 196 frontend tests pass in isolated processes. Browser/WebGL and live integration coverage remain limited.
Connect the existing scroll helper and its reading holds to six architecture stages, including result collection. Keep the existing plate interaction and describe gateway authorization and optional provenance accurately. Validation: architecture sequence and reversible motion tests pass; TypeScript and the synthetic production build pass.
Preserve the README's project and integration material, add a focused local setup path and credential-acquisition links, and move non-README guides into the documentation submodule with an old-to-new index. Record confirmed compatibility breaks separately from possible regressions, with rollout/rollback instructions and validation limits. Missing optional credentials are setup gaps, not grounds for deleting working integrations. Validation: 98 local documentation links resolve; authored-guide and application whitespace checks pass. Archived formatting is preserved. BREAKING CHANGE: Non-README documentation paths now live in the initialized documentations submodule. Update links/scripts and explicitly load relocated frontend AGENTS.md/CLAUDE.md guidance. Read documentations/guides/audit-cleanup-migration.md before upgrading; this change does not migrate databases or deploy production source.
This branch has not been deployed
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.
Problem and result
Local setup had inconsistent environment loading and MongoDB targets, optional integrations could block startup, and browser storage clients used public provider credentials. This change gives each component a documented setup path, moves cloud pinning behind authenticated server routes, and makes authentication failures recoverable.
The existing README's project, research, and integration material is retained. New setup and credential-acquisition guidance explains how to enable optional features without removing their working code when credentials are unavailable.
Scope
Relative to QMesh's main, this branch also includes three earlier commits: bundled local fonts, restored IPFS exports/Helia-compatible DAG-JSON, and removal of
.github/workflows/promote-vercel-production.yml. Reviewers should account for that deployment-automation change; these are part of the branch's eight commits, not new cleanup additions.BREAKING CHANGE: migration required
Preserve the
!titles andBREAKING CHANGE:notes if squashing.NEXT_PUBLIC_PINATA_JWTtoPINATA_JWTandNEXT_PUBLIC_LIGHTHOUSE_KEYtoLIGHTHOUSE_API_KEY; rebuild and rotate previously exposed keys. Uploads require sign-in. Permanent deletion returns 409; use the provider dashboard after checking shared ownership.MONGODB_DB_NAMEexplicitly to preserve the auth database.uv sync --lockedinstead of the removeddevextra; add--extra pharmafor chemistry. Direct prompt paths changed.run-cleanno longer deletes runtime state; busy ports fail safely. Restart recovery fails interrupted attributed jobs and reconciles their holds.AGENTS.md/CLAUDE.mdguidance must be loaded explicitly.Full migration, probable regressions, rollout, and rollback.
Validation at head
9507b6d61Dependencies and merge readiness
ac826c6with a merge commit, or update this branch's submodule pointer if that PR is squash/rebase merged.This PR is a draft for contributor review. Back up configuration/data, drain active work, and deploy matching frontend/backend versions after staging validation. Roll back matching artifacts and configuration without restoring exposed credentials or public access. No production source deployment, database migration, release tag, or main-branch merge is performed by opening this PR.
Uncommitted local files are excluded.