Skip to content

Latest commit

 

History

History
206 lines (152 loc) · 28.2 KB

File metadata and controls

206 lines (152 loc) · 28.2 KB

Changelog: USpeaks API Layer

Mandatory Policy: All work, including minor and major milestones, architectural shifts, and feature additions, MUST be documented in this changelog. No exceptions. This ensures transparency and a clear "building in public" record for the totality of the repo.


[0.1.10] - 2026-03-19

Fixed

  • Write Nonce Recovery Hardening: Updated packages/api/src/shared/execution-context.ts so API-layer write retries now treat replacement fee too low, replacement transaction underpriced, transaction underpriced, and already known as nonce-recovery conditions. Retry nonce selection now advances past the local signer watermark instead of reusing a stale pending nonce when Base Sepolia nodes lag on pending nonce propagation.
  • Gas-Aware Native Funding Helpers: Updated packages/api/src/app.contract-integration.test.ts and scripts/base-sepolia-operator-setup.ts so native-balance top-ups reserve transfer gas before selecting a funder. This removes the prior false-positive funding attempts where a wallet appeared solvent on raw balance but could not actually cover value + gas, and setup:base-sepolia now fails with a direct spendable-balance message instead of a later eth_estimateGas error.

Verified

  • Baseline Guard: Re-ran pnpm run baseline:verify; the repo still verifies cleanly against the Base Sepolia fixture RPC fallback.
  • Coverage Gates: Re-ran pnpm run coverage:check; generated coverage now validates 492 wrapper functions, 492 HTTP methods, and 218 events.
  • Repo Green Guard: Re-ran pnpm test -- --runInBand; the default suite remains green with 88 passing files, 348 passing tests, and 17 intentionally skipped live contract-integration proofs.

Known Issues

  • Live Base Sepolia Signer Depletion: Focused reruns of pnpm run test:contract:api:base-sepolia still block on the first founder-signed writes because the configured founder signer now has only about 2.8e12 wei available, below current Base Sepolia write costs. These failures are environment-limited INSUFFICIENT_FUNDS blocks, not missing-route regressions. pnpm run setup:base-sepolia is blocked by the same depleted signer pool until the configured operator wallets receive more Base Sepolia ETH.

[0.1.11] - 2026-03-19

Added

  • Structured Remaining-Domain Verifier Output: Added scripts/verify-report.ts plus scripts/verify-report.test.ts so live proof scripts can emit uniform summary, totals, statusCounts, and per-domain classification / result fields while supporting first-class --output file writes.

Fixed

  • Machine-Readable Remaining Proof Artifacts: Updated scripts/verify-layer1-remaining.ts to write clean JSON to --output targets instead of forcing operators to scrape mixed stdout logs. The script now aliases domain classifications into stable classification / result fields and preserves the full target report structure in verify-remaining-output.json.
  • Funding-Blocked Proof Preservation: Hardened scripts/verify-layer1-remaining.ts so signer funding exhaustion no longer aborts without evidence. When Base Sepolia wallets are depleted, the script now emits domain-scoped blocked by setup/state reports with preflight balance diagnostics for founder, licensing owner, licensee, and transferee actors.

Verified

  • Baseline Guard: Re-ran pnpm run baseline:verify; the repo still verifies cleanly against the Base Sepolia fixture RPC fallback.
  • Coverage Gates: Re-ran pnpm run coverage:check; generated coverage still validates 492 wrapper functions, 492 HTTP methods, and 218 events.
  • Verifier Helper Test: Re-ran pnpm exec vitest run scripts/verify-report.test.ts; the new report helper passes its focused parser + summary coverage.
  • Structured Blocked Artifact: Re-ran pnpm exec tsx scripts/verify-layer1-remaining.ts --output verify-remaining-output.json and confirmed the output file is now pure JSON with summary: "blocked by setup/state", statusCounts for all remaining domains, and captured funding balances instead of interleaved server logs.

Known Issues

  • Base Sepolia Funding Floor Still Blocks Remaining Domains: pnpm run setup:base-sepolia still fails while attempting to top up buyer-key because the richest configured signer only has 2806823057182 wei and the next required transfer path needs 49126000000081 wei. The same limit currently blocks live datasets, licensing, and whisperblock/security proof execution even though the verifier now records that block cleanly.

[0.1.9] - 2026-03-19

Added

  • Diamond Admin ERC-165 Route: Forced DiamondLoupeFacet.supportsInterface(bytes4) into the generated manifest so the live API and generated client wrappers now expose GET /v1/diamond-admin/queries/supports-interface.
  • Multisig Operation Read Route: Forced MultiSigFacet.getOperation(bytes32) into the generated manifest so the live API now exposes GET /v1/multisig/queries/get-operation instead of silently dropping that mounted read during surface generation.

Fixed

  • Governance Threshold Route Drift: Updated packages/api/src/app.contract-integration.test.ts so the threshold-ready governance proof now uses the current POST /v1/governance/proposals endpoint instead of the removed overload-specific path.
  • Live Funding Harness: Reworked the Base Sepolia contract-integration test funding helper to pool native top-ups across multiple configured wallets, avoid self-funding loops, and allow a long-running beforeAll hook without crashing teardown.

Verified

  • Surface Coverage Expansion: Re-ran pnpm run codegen and confirmed wrapper + HTTP coverage now validate 492 methods and 218 events, including the new diamond-admin and multisig routes.
  • Live Contract Progress: Re-ran pnpm run test:contract:api:base-sepolia and improved the live pass count from 2/17 to 6/17. The suite now proves access-control role grant/revoke, voice-asset registration reads/events, authorization + royalty mutation, register-voice-asset workflow persistence, and validation/signer/provider error handling on Base Sepolia.

Known Issues

  • Base Sepolia Gas Exhaustion: The remaining live failures are now dominated by depleted signer balances in the repo .env, not missing routes for the already-fixed diamond-admin/governance cases. Founder and auxiliary wallets no longer have enough ETH to finish the dataset, marketplace, governance write proof, whisperblock encryption-key rotation, licensing, transfer-rights, and later workflow branches.
  • Tokenomics Long-Path Timeout: The tokenomics proof still times out at the current 120s limit under live Base Sepolia conditions, so it remains partial until either the environment is replenished or the proof is split into smaller live branches.

[0.1.8] - 2026-03-19

Fixed

  • Live Layer 1 Funding Preflight: Updated scripts/verify-layer1-live.ts so the Base Sepolia live verifier no longer assumes a single rich signer exists. It now pools native-gas top-ups across the configured founder/oracle wallets, skips self-funding loops, and preloads the founder plus licensing owner before the governance, marketplace, dataset, and voice-asset proof lifecycles execute.

Verified

  • Live Layer 1 Proof Recovery: Re-ran pnpm exec tsx scripts/verify-layer1-live.ts and restored full proof completion for governance, marketplace, datasets, voice-assets, tokenomics, access-control, and admin/emergency/multisig. Fresh proven-working txs from this run include governance submit 0xaacf8c7aa77ffcb90fba14bb109e7655b52ac432a9e8f9f85f221934abee4b7d, marketplace listing 0x6132c2b08a4d7c31979802fd023e706fad215be671f2e49550e83aafc540fca7, dataset create 0x2b486e08ef0fdc624638d7a8dc3da40822c84d96c1c7076481c363383ace87a4, and voice-asset register 0x993264430b3dcfe99c061716bed098c4e8d835c3cbcee074b4a530a35ffdc672.
  • Repo Green Guard: Re-ran pnpm test -- --runInBand; the default suite remains green with 88 passing files, 348 passing tests, and 17 intentionally skipped live contract-integration proofs.

Known Issues

  • Remaining-Domain Gas Ceiling: pnpm exec tsx scripts/verify-layer1-remaining.ts --output verify-remaining-output.json still fails in the current Base Sepolia environment because the configured signer set now only holds dust balances after live proof execution, and the script’s current preflight target still exceeds the available native gas budget. This is narrowed to an environment limitation rather than the earlier live-verifier lifecycle gap.

[0.1.7] - 2026-03-18

Added

  • Deterministic Coverage Gate: Added pnpm run test:coverage in package.json so the repo now has a first-class coverage command that runs Vitest in single-worker mode, avoiding the worker-RPC timeout and coverage/.tmp cleanup race that made the prior ad hoc coverage invocation unreliable.
  • Explicit Live API Contract Entry Point: Added pnpm run test:contract:api:base-sepolia in package.json to run the Base Sepolia HTTP contract-integration suite directly, instead of relying on the hidden API_LAYER_RUN_CONTRACT_INTEGRATION=1 toggle.

Fixed

  • Governance Integration Route Drift: Updated packages/api/src/app.contract-integration.test.ts so the invalid-governance-input assertions hit the current POST /v1/governance/proposals route rather than the removed legacy overload path that was returning 404.

Verified

  • Baseline Commands: Re-ran pnpm run baseline:show and pnpm run baseline:verify; both still resolve cleanly against the Base Sepolia fixture fallback.
  • Generated Surface Coverage: Re-ran pnpm exec tsx scripts/check-http-api-coverage.ts and pnpm exec tsx scripts/check-wrapper-coverage.ts; coverage remains at 489 HTTP-mapped methods and 489 wrapper functions / 218 events.
  • Repo Test Guard: Re-ran pnpm test -- --coverage enough to isolate the failure mode, then confirmed pnpm run test:coverage succeeds end-to-end with 88 passing files, 348 passing tests, and 17 intentionally skipped live contract-integration proofs.

Known Issues

  • Live Contract Suite Partials: The direct Base Sepolia HTTP contract suite still has unresolved live-environment partials in packages/api/src/app.contract-integration.test.ts, including timeout-sensitive long-path tests, setup-dependent signer funding failures (INSUFFICIENT_FUNDS on the transfer helper wallet), and at least one remaining diamond-admin read assertion that still returns 404 during the long-form live run.

[0.1.6] - 2026-03-18

Fixed

  • Layer 1 Completion Probe RPC Bootstrap: Updated scripts/verify-layer1-completion.ts to resolve runtime config through the shared Base Sepolia fallback loader before booting the embedded API server, so completion-surface reads no longer fail with transient connect ECONNREFUSED 127.0.0.1:8548 responses from the repo-default dead fork URL.
  • Completion Probe Actor Mapping: Extended the completion verifier to publish API_LAYER_SIGNER_API_KEYS_JSON alongside the existing API key and signer map setup, preserving actor identity through the real API auth path even for this read-heavy completion probe.
  • Governance Route Probe Drift: Corrected the completion verifier to probe the current exposed governance proposal overload, ProposalFacet.propose(address[],uint256[],bytes[],string,uint8), instead of the intentionally excluded legacy string,string,... signature.

Verified

  • Completion Surface Recovery: Re-ran pnpm exec tsx scripts/verify-layer1-completion.ts and confirmed CommunityRewardsFacet.campaignCount, VestingFacet.hasVestingSchedule, EscrowFacet.isInEscrow, RightsFacet.rightIdExists, and LegacyViewFacet.getLegacyPlan now all return 200 against Base Sepolia with no provider failover errors. The probe now also reports legacyWriteRoutes.createLegacyPlan = true, legacyWriteRoutes.initiateInheritance = true, and governanceLegacyProposeExposed = true.
  • Baseline Guard: Re-ran pnpm run baseline:verify; the default repo state still verifies cleanly against the persisted Base Sepolia fixture RPC fallback.
  • Repo Green Guard: Re-ran pnpm test -- --runInBand; the suite remains green with 88 passing files, 348 passing tests, and 17 intentionally skipped live contract-integration proofs.

[0.1.0] - 2026-03-17

Added

  • Architectural Foundation: Established the four-layer domain architecture (client, api, indexer, db).
  • Base Sepolia Integration: Transitioned the primary testing and deployment baseline to the live Base Sepolia network.
  • Scenario Tooling: Implemented scenario-adapter for running complex end-to-end traces against live network state.
  • Dual-Lifecycle Licensing: Re-engineered the licensing engine to support both Template and Active License lifecycles.
  • Commercialization Guardrails: Implemented strict on-chain ownership checks for voice asset commercialization.
  • Governance Workflow Split: Separated proposal submission and voting to account for real-world block timing and non-zero voting delays on Base Sepolia.
  • Multisig Support: Integrated Layer 4 multisig workflows for administrative operations.
  • Documentation: Added USpeaks Lite Paper and Liquidity Bootstrapping Pool (LBP) launch materials.
  • Automated Codegen: Built a comprehensive pnpm run codegen pipeline for ABI syncing, TypeChain generation, and API surface building.

Fixed

  • Type Safety: Enhanced type safety for contract interactions and adjusted multisig error handling.
  • Gas Limit Testing: Added execution context gas limit tests to prevent transaction failures in complex workflows.
  • Codegen Mismatches: Resolved tuple selector mismatches in the codegen pipeline.

Current Status

  • Core Layer 1 and Layer 2 domains verified on Base Sepolia.
  • Focused on Layer 3 verification and optimizing retry/error-handling workflows.

[0.1.1] - 2026-03-18

Added

  • Live Fixture Refresh: Re-ran Base Sepolia operator setup and persisted the refreshed fixture report in .runtime/base-sepolia-operator-fixtures.json, including actor balances, governance readiness, and marketplace fixture state.
  • Live Layer 1 Proof Refresh: Re-generated verify-live-output.json against Base Sepolia and captured fresh tx hashes, receipts, and readbacks for governance, marketplace, datasets, voice-assets, tokenomics, access-control, and admin/emergency/multisig domains.
  • Remaining Layer 1 Proof Artifact: Added verify-remaining-output.json with fresh Base Sepolia proof coverage for the remaining domains: datasets, licensing, and whisperblock/security.

Fixed

  • Runtime Override Handling: Updated the runtime config loader to let process-level environment overrides take precedence over the repo .env, so Base Sepolia proof commands can be redirected to a live RPC without editing committed secrets.
  • Dataset Verification Completion: Confirmed the live dataset proof now reuses an active license template and completes successfully on Base Sepolia, collapsing the prior InvalidLicenseTemplate(uint256) partial into proven working.
  • Baseline RPC Recovery: Taught the shared runtime loader to recover from the dead local 127.0.0.1:8548 baseline by reusing the last verified Base Sepolia fixture RPC, and surfaced that fallback provenance in the baseline output.
  • Proof Script RPC Consistency: Updated the Base Sepolia setup, live verification, focused verification, and remaining verification scripts to inject the resolved RPC into the embedded API server before boot so contract and HTTP proof paths run against the same chain.
  • Marketplace Fixture Search: Reworked the operator setup aged-listing scan to continue across seller-owned aged assets until it finds one that can be listed and read back as active, instead of stopping on the first stale candidate.
  • Event Proof Readbacks: Fixed the live verifier’s endpoint registry merge so generated event routes are discoverable, and added event-query retries so AssetListed and VoiceAssetRegistered proofs capture actual logs instead of transient empty payloads.
  • Remaining Proof Funding: Expanded the remaining-domain proof funder pool to the richer configured signer actors and raised preflight native-balance top-ups so dataset, licensing, and whisperblock/security runs can complete on Base Sepolia without mid-run gas exhaustion.

Verified

  • Coverage Gates: Re-ran pnpm run coverage:check and kept API-surface and wrapper coverage at 489 methods and 218 events.
  • Config Regression Guard: Added a runtime-config test that locks in override precedence for RPC_URL and ALCHEMY_RPC_URL.
  • Baseline Commands: Re-ran pnpm run baseline:show and pnpm run baseline:verify; both now succeed from the default repo state by falling back to the persisted Base Sepolia fixture RPC when the local fork endpoint is unavailable.
  • Proof Domains: Re-ran the live and remaining Layer 1 proof scripts; all verified domains now classify as proven working, while the setup artifact’s only remaining marketplace partial is explicitly narrowed to purchase-readiness proof rather than listing activation.

[0.1.2] - 2026-03-18

Added

  • Marketplace Buyer Proof: Added scripts/verify-marketplace-purchase-live.ts and the verify:marketplace:purchase:base-sepolia package script to execute a real buyer-key purchase against the aged Base Sepolia fixture listing, then verify ownership transfer, listing deactivation, and marketplace event readbacks.
  • Marketplace Purchase Artifact: Captured the first successful live buyer purchase proof in verify-marketplace-purchase-output.json, including tx 0xf4b5fc77eb57d744a140d362ea8ac4c67276fc86ffec2a6e856417b6b6257bfa, block 39045521, post-purchase owner readback, and AssetPurchased / PaymentDistributed / AssetReleased event evidence.

Fixed

  • Live Contract Harness RPC Resolution: Updated packages/api/src/app.contract-integration.test.ts to resolve runtime config through the shared fallback loader before booting the embedded API server, so the Base Sepolia contract suite no longer collapses immediately on the dead repo-default 127.0.0.1:8548 RPC.
  • Base Sepolia Suite Drift Cleanup: Aligned the long-form contract integration suite with current generated routes and workflow payloads, including marketplace escrow event paths, governance role-query endpoints, tokenomics query names, diamond-admin immutable-selector routes, licensing template creation payloads, and workflow assertions that legitimately return null when approval is already in place.
  • Purchase Proof Artifact Reliability: Hardened scripts/verify-marketplace-purchase-live.ts to write its artifact directly to disk and fall back to creating a fresh listing when the configured fixture has already been consumed, instead of relying on stdout redirection alone.

Verified

  • Marketplace Partial Collapsed: The previously open marketplace setup partial is now proven working on Base Sepolia. The fixture concern about the buyer’s 5000 USDC balance/allowance was not an actual blocker because the aged listing price was 1000, and the live buyer-key purchase completed successfully.
  • Event Mismatch Closed: Confirmed the live artifact mismatch is gone; verify-live-output.json no longer reports missing AssetListed or VoiceAssetRegistered endpoints.
  • Bounded Full-Suite Pass: Re-ran pnpm run test:contract:base-sepolia after the harness fix and observed the suite progressing through the previously blocked live domains under the normal proof script, including access-control, voice-assets, datasets, marketplace, governance, tokenomics, whisperblock, licensing, admin/emergency/multisig, and workflow tests.

Known Issues

  • Fixture Age Regression: A fresh pnpm run setup:base-sepolia now repopulates .runtime/base-sepolia-operator-fixtures.json with an active listing that is still within the marketplace contract’s 1 day purchase lock, so the fixture remains useful for listing-state checks but not as a rerunnable purchase-proof target until the age-selection logic is corrected.

[0.1.3] - 2026-03-18

Added

Fixed

  • Setup Listing-Age Classification: Updated scripts/base-sepolia-operator-setup.ts so setup:base-sepolia no longer mistakes an old asset with a fresh listing for a purchase-ready marketplace fixture. The script now scans seller-owned aged assets for an already-active listing past the contract lock, falls back to creating a new listing only when necessary, and waits for an active listing readback instead of treating any 200 response as success.
  • Marketplace Partial Narrowing: Re-ran .runtime/base-sepolia-operator-fixtures.json and confirmed the remaining marketplace block is now accurately scoped to listing age. The emitted fixture is again an active seller listing, but it is explicitly classified as listed-not-yet-purchase-proven until the 1 day trading lock expires or an older listing is discovered.

Verified

  • Coverage Gates: Re-ran pnpm run coverage:check and kept generated coverage at 489 functions and 218 events, with validated HTTP coverage for 489 methods.
  • Baseline Stability: The prior baseline commands remain green from the default repo state (pnpm run baseline:show and pnpm run baseline:verify from this session’s earlier verification).
  • Targeted Regression Test: Re-ran pnpm exec vitest run scripts/base-sepolia-operator-setup.helpers.test.ts to confirm fresh listings are no longer selected as purchase-ready fixtures.

Known Issues

  • Marketplace Purchase Proof Still Time-Locked: The current setup artifact now reports an honest partial instead of a misleading one: the latest seller listing becomes active during setup, but it is still within the marketplace contract’s 1 day trading lock, so buyer-key purchase proof remains blocked until the listing ages or an older active listing is available.
  • Unrelated Suite Debt: A broad pnpm test -- scripts/base-sepolia-operator-setup.helpers.test.ts run still surfaces pre-existing red tests outside this change: stale manifest/HTTP-registry expectation counts and a timeout in packages/api/src/workflows/register-voice-asset.integration.test.ts.

[0.1.4] - 2026-03-18

Fixed

  • Register Voice Asset Workflow Test Drift: Updated packages/api/src/workflows/register-voice-asset.integration.test.ts to mock the workflow’s current token-id readback and assert the returned tokenId fields, eliminating the false timeout introduced after the workflow started waiting for getTokenId.
  • Manifest Count Guard Hardening: Reworked scripts/manifest.test.ts to validate that generated manifest totals stay internally consistent with the emitted facet and subsystem arrays instead of pinning obsolete historical counts.
  • HTTP Registry Golden Drift Removal: Updated scripts/http-registry.test.ts to verify generated method/event counts and keys against the current reviewed API surface, removing stale hard-coded totals while still locking in registry-to-review alignment.

Verified

  • Baseline Commands: Re-ran pnpm run baseline:show and pnpm run baseline:verify; both remain green against the persisted Base Sepolia fallback RPC from the default repo state.
  • Coverage Gates: Re-ran pnpm run coverage:check and kept generated coverage at 489 functions, 218 events, and validated HTTP coverage for 489 methods.
  • Vitest Suite Recovery: Re-ran pnpm exec vitest run scripts/manifest.test.ts scripts/http-registry.test.ts packages/api/src/workflows/register-voice-asset.integration.test.ts followed by the full pnpm test -- --runInBand suite; the repo is now green with 88 passing test files, 347 passing tests, and 17 intentionally skipped contract-integration tests.

Remaining Issues

  • Marketplace Fixture Age Partial: setup:base-sepolia can still legitimately emit a listed-not-yet-purchase-proven marketplace fixture when no older active listing is available past the contract lock window; this is now the primary remaining live-environment partial called out by the setup artifact.

[0.1.5] - 2026-03-18

Fixed

Verified

  • Marketplace Partial Collapsed For Real: Re-ran pnpm run setup:base-sepolia and regenerated .runtime/base-sepolia-operator-fixtures.json. The marketplace fixture now resolves to token 11 with purchaseReadiness: "purchase-ready" and status: "ready", backed by listing readback { tokenId: "11", seller: "0x276D8504239A02907BA5e7dD42eEb5A651274bCd", price: "1000", createdAt: "1773601130", createdBlock: "38916421", isActive: true }.
  • Targeted Regression Test: Re-ran pnpm exec vitest run scripts/base-sepolia-operator-setup.helpers.test.ts; all helper tests passed.
  • Repo Green Guard: Re-ran pnpm run baseline:show and the full pnpm test -- --runInBand suite; the repo remains green with 88 passing files, 348 passing tests, and 17 intentionally skipped contract-integration proofs.

Status

  • Remaining Setup Partials: None in the current Base Sepolia fixture artifact. Marketplace and governance now both emit ready setup state.