Repository navigation
Conversation
* feat: add hive integration layer * fix: address hive integration review blockers
Add per-world WorldRole, WorldMembership, and WorldAuditLog models Separate platform admin status with User.platformRole Add typed world and platform permission definitions Add reusable world authorization middleware and resource policies Reject revoked memberships and cross-world policy misuse Add founder membership backfill for existing worlds Keep seed data idempotent with active founder memberships Add audit metadata allowlist and duplicate-vote conflict helper Stop tracking generated Prisma client output and generate before API checks Remove duplicate baseline migration Add focused unit tests for roles, policies, audit metadata, conflicts, and founder rollout
- Add prisma-conflicts.ts to handle duplicate vote conflicts. - Create world-audit-log.ts and corresponding tests for moderation audit logs. - Implement world-authorization.ts with user and membership authorization logic. - Define world permissions and roles in world-permissions.ts with tests. - Establish resource policies in world-resource-policies.ts to manage draft editing and voting permissions. - Add comprehensive tests for all new functionalities to ensure correct behavior.
…ement - Added Google authentication support with environment variable configuration. - Enhanced logging by redacting sensitive information in Fastify logger. - Improved environment variable parsing with validation for JWT secrets and Google OAuth settings. - Refactored authentication routes to include challenge and verification processes. - Implemented rate limiting for authentication attempts to prevent abuse. - Updated frontend to handle new authentication flows and display appropriate error messages. - Added cookie management for refresh tokens and session handling. - Enhanced user experience with loading states and error handling in the UI.
- Add auth-challenges.ts for creating and consuming authentication challenges. - Introduce auth-cookies.ts for managing refresh cookies. - Implement auth-crypto.ts for JWT signing and verification. - Create auth-middleware.ts for handling request authentication. - Develop auth-sessions.ts for issuing and revoking refresh sessions. - Add hive-signature.ts for verifying Hive signatures. - Normalize Hive usernames in hive-username.ts with validation. - Create tests for auth-crypto, auth-middleware, auth-sessions, and hive-signature functionalities. - Implement API functions for authentication in web/src/lib/api/auth.ts.
* Harden authentication secret handling * Back auth rate limits with Postgres
…anagement - Added auth-rate-limit-store for managing rate limits on API requests. - Introduced canon-voting-policy for defining voting rules and tallying votes. - Developed canon-voting module for handling proposal voting logic, including casting votes and finalizing decisions. - Created API routes for managing proposals, including fetching details, voting, and confirming transactions. - Implemented client-side API functions for interacting with the new proposal and voting endpoints.
…arity + feat: enhance canon voting logic and add tests for voting policy
- Introduced endpoints for listing and creating comments on proposals. - Added ProposalComment model to the database schema with necessary fields and constraints. - Implemented logic for handling comment creation, including validation and authorization checks. - Updated frontend to support displaying and posting comments on proposals. - Created tests to ensure proper functionality and error handling for comment-related operations.
…g confirmations and authority validation
- Added new environment variables for Hive mainnet and testnet configurations in env.ts. - Introduced HiveReliableBroadcaster for improved transaction broadcasting with retry logic. - Implemented network configuration utilities to build and validate Hive network settings. - Updated canon voting logic to support reliable broadcasting and confirmation of transactions. - Added tests for broadcasting reliability, including transient and permanent error handling. - Refactored existing Hive client and constants to accommodate new configurations and broadcasting features.
- Added `extractRateLimitRouteInfo` function to streamline route info extraction in rate limiting. - Updated `createPrismaRateLimitStore` to utilize the new extraction function. - Enhanced canon voting tests to assert blockchain timestamps for confirmed transactions. - Introduced new tests for Hive broadcast reliability, including transaction lookup and error handling. - Implemented `getBlockHeader` in `DefaultHiveBroadcastTransport` for improved transaction confirmation. - Added smoke operation functionality for Hive mainnet, including new tests and environment configurations. - Created a CLI script for executing Hive mainnet smoke tests with confirmation prompts. - Added utility functions for building and verifying smoke operations. - Introduced new types and constants for smoke operations in the Hive module. - Updated web package to include environment tests for API URL normalization.
…core/hivelore into hive-broadcast-reliability
…oadcast reliability
…frontend-kareem feat(ui): add contribution editor workflow
Hive broadcast reliability
test(web): add contribution editor coverage
GET /profiles/:username is unauthenticated, but the profile query filtered only on the user. contributionDrafts and loreEntries were selected with no status filter, so any visitor could read another user's unsubmitted draft titles and the world they were drafting in. - contributionDrafts: restrict to ContributionStatus.SUBMITTED - loreEntries: restrict to LoreStatus.PUBLISHED_CANON, so DRAFT, SUBMITTED, APPROVED_FOR_PUBLICATION and ARCHIVED stay private to the author The existing test stub returned fixture rows regardless of the query, so a missing filter could not surface. It now honours the nested `where` the way Prisma would, and the fixture carries an unsubmitted draft and a non-canon lore entry that the new test asserts are absent. Removing either filter fails two tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
feat(profile): show reputation badges and history
… request Fastify awaits the onError hook, and reportUnhandledError awaited a fetch with no timeout. A webhook that accepts the connection and never replies therefore kept every erroring request open until OS-level TCP timeouts — minutes. Proven against a deliberately unresponsive server: the call was still pending after 8s. Observability taking the service down with it is the worst version of this, and it would have bitten on the first day ERROR_TRACKING_ENABLED was turned on. - bound delivery with AbortSignal.timeout, default 2s, overridable per call - stop awaiting delivery in the onError hook, so the error response never waits on telemetry at all (reportUnhandledError swallows its own errors, so the floating promise cannot reject) - add a regression test using a server that accepts and never replies; it hangs against the unbounded version and passes in 150ms against this one Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rness feat(api): add observability readiness harness
feat(api): add canon consistency and search
|
Vercel preview is ready: https://hivelore-lobc86pvk-kareemn1936s-projects.vercel.app Commit: ad5a136 |
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.
Queued release, not ready to merge. Opening this as a draft so the 89 commits on
developare visible as a release candidate rather than going out on an incidental push tomain.What this is
mainhas been stale since 29 July (17ef470).developis 89 commits ahead.A fast-forward is not possible —
maincarries two commitsdevelopdoesn't:Neither contributes content. Verified by merging locally:
The merged tree is byte-identical to
develop. So this merge loses nothing and adds nothing beyonddevelop— the mechanics are safe.Why it is a draft
Pushing to
maintriggersdeploy.yml, which deploys Vercel production immediately. That makes this a release, not housekeeping. Before it goes out:develop's web code readsNEXT_PUBLIC_API_URLand falls back tohttp://localhost:3001when unset — deploying without it ships a site whose every request goes to localhost.README.md(line 920) still states: "There is no production API deployment in this scaffold." If that is still true, decide what the deployed frontend should do about it.NEXT_PUBLIC_API_BASE_URLrename ondevelopfirst (Prepare HiveLore preview deployment #32, currently targetingmainand awaiting a rebase).HOSTING_GUIDE.mdondevelopalready documentsNEXT_PUBLIC_API_BASE_URLwhile the code readsNEXT_PUBLIC_API_URL; releasing before that is reconciled ships the inconsistency.main. It currently has none — no required reviews, no required status checks — so anything pushed there deploys to production unreviewed.Related
maintodevelop, so new branches no longer fork from the July snapshot. That is what produced Prepare HiveLore preview deployment #32's stale base.Prepare HiveLore preview deployment, needs re-targeting todevelop.harden HAF indexer replay safety, changes requested.