Skip to content

test: add mirror validation to live API organization creation tests#1493

Merged
TheLastCicada merged 23 commits into
developfrom
v2-rc2
Feb 11, 2026
Merged

test: add mirror validation to live API organization creation tests#1493
TheLastCicada merged 23 commits into
developfrom
v2-rc2

Conversation

@TheLastCicada

Copy link
Copy Markdown
Contributor

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.

TheLastCicada and others added 9 commits February 6, 2026 13:39
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.
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.
@socket-security

socket-security Bot commented Feb 9, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedlog-update@​7.0.2 ⏵ 7.1.0100 +1100100 +188100
Updatedsemver@​7.7.3 ⏵ 7.7.410010010092100
Updateddotenv@​17.2.3 ⏵ 17.2.49910010093100

View full report

@socket-security

socket-security Bot commented Feb 9, 2026

Copy link
Copy Markdown

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.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: npm caniuse-lite under CC-BY-4.0

License: CC-BY-4.0 - the applicable license policy does not allow this license (4) (npm metadata)

License: CC-BY-4.0 - the applicable license policy does not allow this license (4) (package/LICENSE)

License: CC-BY-4.0 - the applicable license policy does not allow this license (4) (package/package.json)

From: package-lock.jsonnpm/@babel/preset-env@7.29.0npm/@babel/core@7.29.0npm/caniuse-lite@1.0.30001769

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/caniuse-lite@1.0.30001769. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

TheLastCicada and others added 14 commits February 9, 2026 12:08
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>
@TheLastCicada TheLastCicada merged commit 3e58633 into develop Feb 11, 2026
20 checks passed
@TheLastCicada TheLastCicada deleted the v2-rc2 branch February 11, 2026 20:34
@TheLastCicada TheLastCicada restored the v2-rc2 branch February 11, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant