chore: verify-tenancy DoD probe script (dev + prod) - #62
Conversation
🤖 CodeAnt AI — Review Status
|
✅ Deploy Preview for moderaty ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR adds a read-only tenancy verification CLI. It checks database integrity, ownership constraints, and tenancy invariants. Vitest tests run the CLI against temporary healthy and invalid libSQL databases. ChangesTenancy verification
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant verifyTenancy as verify-tenancy.mjs
participant Turso
participant Database
Operator->>verifyTenancy: run tenancy verification
verifyTenancy->>Turso: connect with database URL and token
Turso->>Database: execute integrity and tenancy queries
Database-->>verifyTenancy: return results
verifyTenancy->>Database: run and clean up ownership probe
verifyTenancy-->>Operator: report checks and exit status
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sequence DiagramThis PR adds a single read-only probe command that checks database integrity, verifies the channel tenancy constraint with a self-cleaning rejection probe, and evaluates organization invariants before returning a pass or fail exit status. sequenceDiagram
participant Operator
participant Probe
participant Database
Operator->>Probe: Run tenancy verification
Probe->>Database: Check database integrity
Database-->>Probe: Integrity results
Probe->>Database: Verify channel constraint and rejection behavior
Database-->>Probe: Constraint and cleanup results
Probe->>Database: Check user and organization invariants
Database-->>Probe: Invariant results
Probe-->>Operator: Print check results and exit status
Generated by CodeAnt AI |
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 29 (≤ 100 complexity) |
| Duplication | ✅ 0 (≤ 1 duplication) |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
This PR adds a comprehensive tenancy verification script with good test coverage. However, there are 3 critical defects that must be fixed before merge:
Critical Issues:
- Crash risk in
scalar()helper - will crash if queries return no rows - Silent error swallowing - empty catch block masks database connection failures
- Undefined exit code handling - test runner may return undefined exit codes
These issues could cause the verification script to crash or report misleading results in production, defeating its purpose as a database integrity check. Once these defects are addressed, the script will reliably verify tenancy invariants.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
| if (!ok) failures += 1; | ||
| } | ||
|
|
||
| const scalar = async (sql) => (await client.execute(sql)).rows[0].n; |
There was a problem hiding this comment.
🛑 Crash Risk: The scalar helper function will crash with "Cannot read properties of undefined" if a query returns no rows, since it unconditionally accesses rows[0].n. This breaks the script when any of the count queries return unexpected results.
| const scalar = async (sql) => (await client.execute(sql)).rows[0].n; | |
| const scalar = async (sql) => { | |
| const result = await client.execute(sql); | |
| if (!result.rows || result.rows.length === 0) { | |
| throw new Error(`Query returned no rows: ${sql}`); | |
| } | |
| return result.rows[0].n; | |
| }; |
| let rejected = false; | ||
| try { | ||
| await client.execute("INSERT INTO channels (id, user_id, title, refresh_token_enc) VALUES ('UCverify-probe', 'probe', 't', 'x')"); | ||
| } catch { | ||
| rejected = true; | ||
| } | ||
| report('owned channel with NULL org is rejected', rejected, 'INSERT was allowed'); |
There was a problem hiding this comment.
🛑 Logic Error: The empty catch block silently swallows all errors, including database connection failures and authentication errors. This causes the script to incorrectly report "INSERT was allowed" when the real issue is a database connection failure, masking critical infrastructure problems.
| let rejected = false; | |
| try { | |
| await client.execute("INSERT INTO channels (id, user_id, title, refresh_token_enc) VALUES ('UCverify-probe', 'probe', 't', 'x')"); | |
| } catch { | |
| rejected = true; | |
| } | |
| report('owned channel with NULL org is rejected', rejected, 'INSERT was allowed'); | |
| let rejected = false; | |
| let insertError = null; | |
| try { | |
| await client.execute("INSERT INTO channels (id, user_id, title, refresh_token_enc) VALUES ('UCverify-probe', 'probe', 't', 'x')"); | |
| } catch (error) { | |
| insertError = error; | |
| rejected = true; | |
| } | |
| report('owned channel with NULL org is rejected', rejected, insertError ? insertError.message : 'INSERT was allowed'); |
| } catch (error) { | ||
| return { code: error.code, stdout: error.stdout ?? '' }; | ||
| } |
There was a problem hiding this comment.
🛑 Crash Risk: The code accesses error.code which may be undefined for non-exit errors (like thrown exceptions or signals). When execFileAsync rejects with an error that doesn't have a code property, this returns { code: undefined, stdout: '' }, causing test assertions that compare exit codes to fail or behave unpredictably.
| } catch (error) { | |
| return { code: error.code, stdout: error.stdout ?? '' }; | |
| } | |
| } catch (error) { | |
| return { code: error.code ?? 1, stdout: error.stdout ?? '' }; | |
| } |
PR Summary by QodoAdd verify-tenancy probe to validate multi-tenancy invariants (dev + prod)
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
There was a problem hiding this comment.
Pull Request Overview
The PR introduces a database verification script that is functionally comprehensive but contains a critical flaw in its 'non-destructive' design. While intended to be read-only (with a probe exception), the script currently risks polluting production databases with 'UCverify-probe' records if the tenancy constraint it is testing for is missing.
Additionally, the verification logic in the probe's catch block is too broad, which could lead to false positives if the insertion fails for unrelated reasons (like missing tables). The test suite also requires a fix for cross-platform compatibility to ensure it runs correctly on Windows environments. Codacy grade is up to standards, but these logic issues should be addressed before merging.
About this PR
- The automated test suite lacks negative test cases for several key invariants. While it verifies healthy states, it should also include tests for memberless organizations and users with multiple personal organizations to ensure the reporting and exit codes function as expected for all failure modes.
Test suggestions
- Verify structural integrity and foreign key pragmas return successful results on a healthy DB.
- Verify the presence and enforcement of the 'channels_org_requires_owner' constraint via DDL inspection and a probe INSERT.
- Verify that every active user has exactly one personal organization and is its owner.
- Verify that organizations without owners are identified as failures.
- Verify that organizations without any members are identified as failures.
- Verify that the script exits with code 1 and identifies the failure when a constraint is missing or a row is orphaned.
- Missing negative test scenario for memberless organizations
- Missing negative test scenario for users with multiple personal organizations
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Missing negative test scenario for memberless organizations
2. Missing negative test scenario for users with multiple personal organizations
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| try { | ||
| await client.execute("INSERT INTO channels (id, user_id, title, refresh_token_enc) VALUES ('UCverify-probe', 'probe', 't', 'x')"); | ||
| } catch { | ||
| rejected = true; | ||
| } | ||
| report('owned channel with NULL org is rejected', rejected, 'INSERT was allowed'); | ||
| const orphans = await scalar("SELECT count(*) AS n FROM channels WHERE id = 'UCverify-probe'"); | ||
| report('rejected probe left no row', orphans === 0, `${orphans} row(s) present`); | ||
|
|
There was a problem hiding this comment.
🔴 HIGH RISK
The probe INSERT logic poses a data pollution risk and a false-positive risk. 1) If the tenancy constraint is missing (the failure case), the 'UCverify-probe' row remains in the database; an explicit DELETE or transaction rollback is required. 2) The catch block is too broad; it should specifically verify that the error is a 'channels_org_requires_owner' constraint violation to avoid false positives from other errors (e.g., missing tables).
| async function runProbe(url) { | ||
| const { TURSO_AUTH_TOKEN: _token, TURSO_DATABASE_URL: _url, ...rest } = process.env; | ||
| try { | ||
| const { stdout } = await execFileAsync('node', [PROBE.pathname], { env: { ...rest, TURSO_DATABASE_URL: url } }); |
There was a problem hiding this comment.
🟡 MEDIUM RISK
Suggestion: Use fileURLToPath from the node:url module for robust cross-platform path resolution. On Windows, URL.pathname can return invalid path formats (e.g., leading slashes before drive letters), which may cause execFileAsync to fail.
Code Review by Qodo
Context used✅ Compliance rules (platform):
77 rules 1.
|
| // Tenancy Definition-of-Done probe: verifies the multi-tenancy invariants of | ||
| // whichever Turso database TURSO_DATABASE_URL points at (dev `db` by default; | ||
| // point it at production `moderaty` after applying a migration there). READ | ||
| // ONLY except the contract probes, which clean up after themselves. |
There was a problem hiding this comment.
1. verify-tenancy.mjs can target prod 📘 Rule violation § Compliance
The new scripts/verify-tenancy.mjs tooling reads TURSO_DATABASE_URL and explicitly suggests pointing it at production, so local tooling is not constrained to DEV-only databases. This increases the risk of accidentally running verification/probe logic against production.
Agent Prompt
## Issue description
`scripts/verify-tenancy.mjs` is local tooling that can be pointed at production via `TURSO_DATABASE_URL` (and even suggests doing so), violating the requirement that local tooling use only the DEV Turso database.
## Issue Context
The compliance rule requires local tooling to either hardcode a DEV database identifier or reference a DEV-only environment variable (e.g., `TURSO_DEV_URL`) and avoid production variables/targets.
## Fix Focus Areas
- scripts/verify-tenancy.mjs[20-38]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/verify-tenancy.mjs`:
- Around line 59-60: Update the schema validation flow around the channels DDL
query to detect a missing channels table explicitly instead of defaulting to an
empty string. Report a labeled schema failure, close the client, and exit with
status 1 before executing the channel checks; add a regression test covering the
missing-table case.
- Around line 72-96: Extract the repeated count-validation and detail-reporting
flow from the five checks into a reusable helper in scripts/verify-tenancy.mjs
that accepts the report label, count query, and detail query. Have the helper
execute the count query, compare the result with zero, serialize the
detail-query rows, and call report; then replace each duplicated block while
preserving its existing queries and labels.
- Around line 61-69: Update scripts/verify-tenancy.mjs lines 61-69 and the
related tests in scripts/verify-tenancy.test.mjs lines 122-128: run the channel
constraint probe in a rollback-only transaction using a fresh ID and valid user
reference, and mark rejection as successful only when the error contains
channels_org_requires_owner. Ensure the transaction always rolls back, add
assertions that no probe row remains and that unrelated errors report FAIL, and
add the reproducing tests before the implementation fix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 671f4bd6-bc11-4334-9d8b-300ea77fdbd1
📒 Files selected for processing (2)
scripts/verify-tenancy.mjsscripts/verify-tenancy.test.mjs
| const ddl = (await client.execute("SELECT sql FROM sqlite_master WHERE name = 'channels' AND type = 'table'")).rows[0]?.sql ?? ''; | ||
| report('channels DDL contains channels_org_requires_owner', ddl.includes('channels_org_requires_owner'), ddl.slice(0, 200)); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Stop after a missing channels table.
The ?? '' fallback reports one failed check. Line 63 then throws for the missing table. The command skips the remaining reports, final summary, and client.close().
Report a labeled schema failure, close the client, and exit with status 1 before running channel checks. Add a missing-table regression test before the fix.
As per coding guidelines, “Fail loudly: never use silent fallbacks; fallbacks must log server-side and show an appropriate message to the user.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/verify-tenancy.mjs` around lines 59 - 60, Update the schema
validation flow around the channels DDL query to detect a missing channels table
explicitly instead of defaulting to an empty string. Report a labeled schema
failure, close the client, and exit with status 1 before executing the channel
checks; add a regression test covering the missing-table case.
Source: Coding guidelines
…cleanup, no false passes
|
Triage — bot round 1 (commit All 5 findings valid, all fixed:
New regression test: Gates: |
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/verify-tenancy.mjs`:
- Around line 81-85: Update the verification flow around the probe and cleanup
so a missing channels table is handled before attempting unconditional cleanup,
while preserving explicit failure reporting rather than silently falling back.
Capture stderr for the missing-table test and assert the controlled final
output, including the remaining reports and summary; ensure client.close() is
always executed by moving it into a finally block around the verification
lifecycle.
- Around line 68-85: Make the channel verification probe use a unique
per-invocation ID and ensure cleanup cannot remove pre-existing data: update the
probe INSERT, DELETE, and orphan-count query in the verification flow,
preferably by running the probe in a rollback-only transaction or by deleting
only after confirming this invocation inserted the row. Add a regression test
that seeds the shared legacy ID, runs the command, and verifies the seeded row
remains unchanged.
- Around line 74-78: Update the error-matching condition in the tenancy
verification flow to accept only messages containing the named
channels_org_requires_owner constraint, removing the generic CHECK constraint
alternative. Add a test covering a schema without channels_org_requires_owner
but with a different rejecting CHECK constraint, and assert that verification
reports FAIL; commit the test and fix together.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2008a585-f682-4d95-aa06-c13a61bd6e87
📒 Files selected for processing (2)
scripts/verify-tenancy.mjsscripts/verify-tenancy.test.mjs
…er-check error containment, dedupe zero-count checks
|
Triage — bot round 2 (commit Stale (posted on the pre- Valid — fixed in
Invalid — no change: qodo #1 (script can target prod). This is the tool's documented purpose: it is the tenancy Definition-of-Done probe a human runs against whichever database Gates: |
|
Triage — bot round 3 (commit
PR state: |
|
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/verify-tenancy.test.mjs (1)
97-114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
client.executeMultipleinstead of manually splitting on;.
(NON_CHANNEL_DDL + channelsDdl + seedSql).split(';')breaks statement boundaries incorrectly if any seed value ever contains a literal;(for example, in atitlestring).@libsql/clientprovidesexecuteMultiple(sql)to run "a sequence of SQL statements separated by semicolons" and throws on the first failing statement, which removes this fragility and the manual loop.♻️ Proposed fix
- for (const statement of (NON_CHANNEL_DDL + channelsDdl + seedSql).split(';')) { - const trimmed = statement.trim(); - if (trimmed) await client.execute(trimmed); - } + await client.executeMultiple(NON_CHANNEL_DDL + channelsDdl + seedSql);Please confirm
executeMultiplebehaves as documented in the@libsql/clientversion pinned by this repository (0.17.4), since this changes how partial-failure DDL/seed setup surfaces in test error output.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/verify-tenancy.test.mjs` around lines 97 - 114, The buildDb function should use client.executeMultiple with the combined NON_CHANNEL_DDL, channelsDdl, and seedSql instead of manually splitting SQL on semicolons and executing a loop. Confirm the pinned `@libsql/client` 0.17.4 supports this API and preserves first-failure propagation, while retaining client closure and URL return behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/verify-tenancy.mjs`:
- Around line 71-93: Extract the repeated try/catch/report logic from the
structural checks and channels DDL read into a small reusable helper, following
the existing expectZero pattern. Update the PRAGMA foreign_key_check, PRAGMA
integrity_check, and channels DDL retrieval call sites to use the helper while
preserving their labels, success conditions, and fail(error) reporting.
---
Outside diff comments:
In `@scripts/verify-tenancy.test.mjs`:
- Around line 97-114: The buildDb function should use client.executeMultiple
with the combined NON_CHANNEL_DDL, channelsDdl, and seedSql instead of manually
splitting SQL on semicolons and executing a loop. Confirm the pinned
`@libsql/client` 0.17.4 supports this API and preserves first-failure propagation,
while retaining client closure and URL return behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d9d28711-175d-4b2d-9b8b-04ac5fe1b566
📒 Files selected for processing (2)
scripts/verify-tenancy.mjsscripts/verify-tenancy.test.mjs
| try { | ||
| // 1. Structural integrity. | ||
| try { | ||
| const fk = await rows('PRAGMA foreign_key_check'); | ||
| report('PRAGMA foreign_key_check returns zero rows', fk.length === 0, JSON.stringify(fk)); | ||
| } catch (error) { | ||
| report('PRAGMA foreign_key_check returns zero rows', false, fail(error)); | ||
| } | ||
| try { | ||
| const integrity = (await client.execute('PRAGMA integrity_check')).rows[0]?.integrity_check; | ||
| report('PRAGMA integrity_check is ok', integrity === 'ok', String(integrity)); | ||
| } catch (error) { | ||
| report('PRAGMA integrity_check is ok', false, fail(error)); | ||
| } | ||
|
|
||
| // 2. Tenancy contract: the CHECK exists and bites. | ||
| let ddl = ''; | ||
| try { | ||
| ddl = (await client.execute("SELECT sql FROM sqlite_master WHERE name = 'channels' AND type = 'table'")).rows[0]?.sql ?? ''; | ||
| } catch (error) { | ||
| report('channels DDL is readable', false, fail(error)); | ||
| } | ||
| report('channels DDL contains channels_org_requires_owner', ddl.includes('channels_org_requires_owner'), ddl.slice(0, 200)); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Extract the repeated try/catch/report pattern.
The PRAGMA foreign_key_check block (Lines 73-78), the PRAGMA integrity_check block (Lines 79-84), and the DDL read (Lines 88-92) repeat the same try { ... } catch (error) { report(label, false, fail(error)); } shape. A small helper following the same pattern as expectZero removes this duplication.
As per coding guidelines, "Do not copy and paste code; create reusable code instead."
♻️ Proposed helper
+async function guarded(label, fn) {
+ try {
+ return await fn();
+ } catch (error) {
+ report(label, false, fail(error));
+ return undefined;
+ }
+}
+
try {
// 1. Structural integrity.
- try {
- const fk = await rows('PRAGMA foreign_key_check');
- report('PRAGMA foreign_key_check returns zero rows', fk.length === 0, JSON.stringify(fk));
- } catch (error) {
- report('PRAGMA foreign_key_check returns zero rows', false, fail(error));
- }
+ await guarded('PRAGMA foreign_key_check returns zero rows', async () => {
+ const fk = await rows('PRAGMA foreign_key_check');
+ report('PRAGMA foreign_key_check returns zero rows', fk.length === 0, JSON.stringify(fk));
+ });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/verify-tenancy.mjs` around lines 71 - 93, Extract the repeated
try/catch/report logic from the structural checks and channels DDL read into a
small reusable helper, following the existing expectZero pattern. Update the
PRAGMA foreign_key_check, PRAGMA integrity_check, and channels DDL retrieval
call sites to use the helper while preserving their labels, success conditions,
and fail(error) reporting.
Source: Coding guidelines
PR Code Suggestions ✨Latest suggestions up to commit
|
| Category | Suggestion | Severity | Generated at (UTC) |
| Incomplete implementation |
The test fixture omits foreign-key enforcement, making the structural integrity check vacuousThe healthy fixture recreates scripts/verify-tenancy.test.mjs [57-63] Why it matters? 🤔
(Use Cmd/Ctrl + Click for best experience) Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** scripts/verify-tenancy.test.mjs
**Line:** 57:63
**Comment:**
*Incomplete Implementation: The healthy fixture recreates `memberships` without the production foreign keys and never enables `PRAGMA foreign_keys`, so `PRAGMA foreign_key_check` is guaranteed to return zero rows regardless of relational corruption. Consequently the test does not verify the structural-integrity check it claims to cover and can remain green when those constraints are missing or broken. Mirror the production foreign keys and enable foreign-key enforcement when constructing the fixture.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix | Major | 2026-08-03 20:12
|




User description
Behavior
Packages the tenancy Definition-of-Done database checks as one read-only command so the production application of migration 0013 is verifiable in a single step:
node --env-file=.env scripts/verify-tenancy.mjs # dev (db); point TURSO_DATABASE_URL at moderaty for prodTen checks, each printing PASS/FAIL with offending rows on failure, exit 1 if anything fails:
foreign_key_checkzero rows,integrity_checkokchannelsDDL containschannels_org_requires_owner; an owned channel with NULL org is rejected and leaves no row (self-cleaning probe)user_idset andorg_idNULLVerified live against the dev DB: 10/10 PASS.
Tests
scripts/verify-tenancy.test.mjs(3 tests, child-process against temp file DBs, follows theseed-dev.test.mjspattern): healthy contract DB → exit 0 / ALL CHECKS PASSED; pre-contract DB (no CHECK) → exit 1 naming the DDL and rejection checks; ownerless org → exit 1 naming the invariant. Mutation-checked: neutering the failure counter fails both negative tests.Verification
npm run check0/0 ·npm run test47 files, 380/380 ·npm run buildclean · codacy-analysis 0 issuesCodeAnt-AI Description
Add a reliable tenancy verification check for development and production databases
What Changed
Impact
✅ Reliable production tenancy verification✅ No leftover or deleted application data from checks✅ Clear failure results for incomplete migrations and invalid tenancy data💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.