@remits/remits-cli 0.1.75 → 0.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,7 +65,8 @@ remits-cli install --skills --overwrite true
65
65
  - The platform repo's `docs/guides/` tree remains the single source of truth; the platform serves it from the classpath, so published CLI versions never carry guide content.
66
66
  - Authenticated users also get the **core Remits platform repo** locally. After guide sync (and on `auth` / discovery), `remits-cli` first reuses any existing local copy it already knows about, can detect directly (`REMITS_PLATFORM_DIR`, the running CLI source in dev, `~/remits`), or can discover under the configured scan roots; only if none is found does it clone `git@github.com:tmillhouse/remits.git` (default `~/remits`, override with `REMITS_PLATFORM_DIR`; cloning only runs in an interactive terminal). On each authenticated run it also fast-forwards the repo (`git pull --ff-only`, once per process) so back-stage analysis runs against current code — skipped automatically if the working tree is dirty, so local work is never clobbered. The repo is tracked in `~/.remits-cli/account-repos.json` under the reserved `platform` entry so agents can analyze back-stage seams and open a fix PR when a front-stage failure turns out to be platform brittleness.
67
67
  - Branch defaults to the current local git branch.
68
- - Data mode defaults to `test`. Use `remits-cli data-mode set prod` only for production investigation.
68
+ - Data mode defaults to `test`. For `remits-cli test run`, that default is now enforced even if the most-recent authenticated session for the account is `prod`; a production test run therefore requires an explicit `--data-mode prod` on the command line. Use `remits-cli data-mode set prod` only for production investigation.
69
+ - Avoid commas in individual test names. The `--names` filter is comma-delimited, so a single test case whose name contains commas cannot be targeted cleanly through `remits-cli test run --names ...`.
69
70
  - Test activity is streamed from websocket `TestSuite` events while final status is also polled from `/cli/test`.
70
71
  - Tool execution writes the full response to a separate file so large payloads do not bloat the session log.
71
72
 
package/index.js CHANGED
@@ -1758,7 +1758,12 @@ async function testCommand(flags) {
1758
1758
  const { session, accountId } = resolveSessionContext(cwd, flags);
1759
1759
  const baseUrl = flags['base-url'] || session.baseUrl || DEFAULT_BASE_URL;
1760
1760
  const branchName = flags.branch || currentBranch(cwd);
1761
- const dataMode = resolveDataMode(flags, session);
1761
+ // Test runs must default to test dataMode even when the most-recent authenticated
1762
+ // session for the account is prod. Production test runs therefore require an explicit
1763
+ // --data-mode prod on the command line.
1764
+ const dataMode = hasExplicitDataModeFlag(flags)
1765
+ ? resolveDataMode(flags, null)
1766
+ : DEFAULT_DATA_MODE;
1762
1767
  const testRef = flags.test || flags['test-id'] || flags.name;
1763
1768
 
1764
1769
  if (!testRef) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remits/remits-cli",
3
- "version": "0.1.75",
3
+ "version": "0.1.76",
4
4
  "description": "Local CLI for auth, component sync, and live test execution against Remits",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -471,6 +471,10 @@ remits-cli test run --test "Invoice Tests" --names "specific test case"
471
471
 
472
472
  Tests run on the platform against your staged snapshot. They stream results in real-time. If they fail, fix the code, re-stage, and re-run.
473
473
 
474
+ Important test-runner constraints:
475
+ - `remits-cli test run` now defaults to `test` dataMode unless you explicitly pass `--data-mode prod`.
476
+ - Do not put commas in individual `test("...")` names. The CLI `--names` filter is comma-delimited, so comma-bearing test names cannot be targeted cleanly as a single selected case.
477
+
474
478
  If no relevant Test component exists yet, consider creating one. Test components live in `components/tests/` and follow the same component structure. They provide permanent regression protection — every test you write today saves debugging time tomorrow.
475
479
 
476
480
  New test files use the `new_` prefix (e.g., `new_MyTest.groovy`). New tests have no database ID, so you must run them **by name**: `remits-cli test run --test "My Test"`. After committing, the platform assigns an ID and renames the file (e.g., `4_MyTest.groovy`) — then you can run by either ID or name.
@@ -1196,6 +1200,10 @@ remits-cli tools [--data-mode test|prod]
1196
1200
  remits-cli tool --name <toolName> [--input "{...}"] [--data-mode test|prod]
1197
1201
  ```
1198
1202
 
1203
+ For tests specifically:
1204
+ - If `--data-mode` is omitted, `remits-cli test run` uses `test`.
1205
+ - `--names` is comma-delimited, so keep individual test names comma-free.
1206
+
1199
1207
  ## Troubleshooting
1200
1208
 
1201
1209
  | Symptom | Fix |