test: add mirror validation to live API organization creation tests#1493
Conversation
Verify that each organization store (org_uid, registry, data_model_version, file_store) has exactly one mirror owned by us with the correct DATALAYER_FILE_SERVER_URL from config. Fails if no mirrors exist, more than one mirror belongs to us, or the URL doesn't match. Skips gracefully if DATALAYER_FILE_SERVER_URL is not configured.
…enames for parallel execution
Migrate import assertions to import attributes syntax (assert -> with), add stream error handling in xls.js, and update all CI/Docker/config version references to Node 24.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
projectStatus should be a single picklist value, not an array like projectType and projectSector. Updated validation, model, controller, migration, mirror model, tests, and documentation.
On every CADT startup when a MySQL mirror is configured, backfill all 22 mirrored V2 tables from SQLite into MySQL using batched upsert (bulkCreate with updateOnDuplicate). This ensures existing data is populated when a mirror is first added to an existing instance, and keeps the mirror in sync on subsequent restarts.
When datalayer returns 'Latest root is already confirmed', the data has already been pushed and confirmed on-chain. Treat this as success instead of entering a futile retry loop, similar to the existing 'Changelist resulted in no change to tree data' handler.
When datalayer returns 'Latest root is already confirmed', the data has already been pushed and confirmed on-chain. Treat this as success instead of entering a futile retry loop, similar to the existing 'Changelist resulted in no change to tree data' handler. Add unit tests for all pushChangeListToDataLayer error handling paths.
Coin splitting triggers wallet re-syncing which can take more than 5 minutes. The previous retry logic was capped at 10 attempts x 30s (5 minutes), causing intermittent CI failures. Refactored to a shared time-based retry helper with a 20-minute window. Also fixed the retryable request wrapper to detect 'wallet is not available' errors.
Remove unnecessary DELETE FROM issuance that destroyed data during the cad_trust_methodology_id -> cad_trust_project_methodology_id rename. The column data is identical and only needs a name change. Also add MySQL/MariaDB dialect support for mirror databases.
Provides AI agent guidance for running integration tests (v1/v2), live API tests (data-short/extended), and test data cleanup commands with prerequisites and context for each test type. Co-authored-by: Cursor <cursoragent@cursor.com>
AEF T3/T4 validations referenced nonexistent picklist keys ('type',
'metric') causing all submitted values to be rejected. Switch to
runtime pickListValidationV2() with correct keys. Consolidate
governance-v2-real-picklists.js into governance-v2.stub.js using
production picklist data as the single default fallback. Fix test
data generators to use matching picklist keys.
Co-authored-by: Cursor <cursoragent@cursor.com>
Provides structured context on CI workflow jobs, gh CLI commands for retrieving run status, failed steps, and logs, and common failure patterns specific to the CADT test suite. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove cross-file duplication, switch v2.mdc to agent-decided rule type, add missing descriptions for better triggering, eliminate human-oriented prose the AI already knows, resolve git instruction conflict, and remove redundant fnm prefixes from cadt-testing skill. Co-authored-by: Cursor <cursoragent@cursor.com>
…ators Test data generators used placeholder values that don't match the actual governance picklist definitions, causing v2 live API test failures for aef-t3-actions and aef-t4-holdings POST operations. Fixed fields: - aefT3ActionsType: "Energy efficiency" -> valid picklist values - aefT3ActionsMetric: "tCO2e" -> GHC/Non-GHG - aefT3ActionsMitigationType: "Energy efficiency" -> Emission reductions/Removals - aefT4HoldingsMetric: "tCO2e" -> GHC/Non-GHG - aefT4HoldingsMitigationType: "Energy efficiency" -> Emission reductions/Removals Co-authored-by: Cursor <cursoragent@cursor.com>
Verify that each organization store (org_uid, registry, data_model_version, file_store) has exactly one mirror owned by us with the correct DATALAYER_FILE_SERVER_URL from config. Fails if no mirrors exist, more than one mirror belongs to us, or the URL doesn't match. Skips gracefully if DATALAYER_FILE_SERVER_URL is not configured.