Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/documentation-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
uses: actions/checkout@v4
with:
repository: recoupable/cli
# CLI #28: includes cost-estimate checks with non-forwarding synthetic fetch.
ref: 39730150e88630c01832f861696e2be15e9cde72
# Canonical origin and redirect-rejection guard; commands remain intercepted.
ref: 213de5156491e109c6b7243af4c8c17876370d93
path: .contract-cli
persist-credentials: false
- uses: pnpm/action-setup@v4
Expand All @@ -62,4 +62,4 @@ jobs:
working-directory: .contract-cli
env:
RECOUP_CLI_REFERENCE_PATH: ${{ github.workspace }}/content/docs/source/cli.mdx
run: pnpm exec vitest run __tests__/publishedCommands.test.ts
run: pnpm exec vitest run __tests__/publishedCommands.test.ts __tests__/config.test.ts __tests__/clientRedirects.test.ts
13 changes: 8 additions & 5 deletions DOCUMENTATION-POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,14 @@ and keep deployment verification separate from contract checks.
## CLI guide compatibility

The `cli-guide` job in `.github/workflows/documentation-contract.yml` builds the
immutable CLI #28 merge and runs its existing published-command guard against
this PR's `content/docs/source/cli.mdx`. Marketing owns candidate-guide failures;
immutable CLI source revision pinned in that workflow and runs its existing published-command guard against
this PR's `content/docs/source/cli.mdx`. Docs owns candidate-guide failures;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: "Docs owns candidate-guide failures" is ambiguous in this file, where "Docs" also names the separate compatibility host that must not author this guide. Name this repository explicitly so failures route to the right owner.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At DOCUMENTATION-POLICY.md, line 202:

<comment>"Docs owns candidate-guide failures" is ambiguous in this file, where "Docs" also names the separate compatibility host that must not author this guide. Name this repository explicitly so failures route to the right owner.</comment>

<file context>
@@ -199,7 +199,7 @@ and keep deployment verification separate from contract checks.
 The `cli-guide` job in `.github/workflows/documentation-contract.yml` builds the
 immutable CLI source revision pinned in that workflow and runs its existing published-command guard against
-this PR's `content/docs/source/cli.mdx`. Marketing owns candidate-guide failures;
+this PR's `content/docs/source/cli.mdx`. Docs owns candidate-guide failures;
 CLI owns command behavior and the guard. The check covers email/song/cost-estimate examples,
 `--chat-id` request mapping, and rejection of retired `--room-id` before dispatch.
</file context>
Suggested change
this PR's `content/docs/source/cli.mdx`. Docs owns candidate-guide failures;
this PR's `content/docs/source/cli.mdx`. This repository owns candidate-guide failures;

CLI owns command behavior and the guard. The check covers email/song/cost-estimate examples,
`--chat-id` request mapping, and rejection of retired `--room-id` before dispatch.
Requests are intercepted with synthetic credentials and never forwarded to an API.
Command requests are intercepted with synthetic credentials and never forwarded to an API.
The same job checks the candidate guide default against CLI configuration and runs
GET/POST redirect rejection fixtures on loopback HTTP servers with fake keys; no
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
live API is contacted. These checks do not establish npm publication or installation.
Cost-estimate examples must use GET without a body and preserve their default or
explicit query flags. These checks do not verify real prices or create content.

Expand All @@ -211,8 +214,8 @@ update the workflow's exact CLI commit pin and the maintained guide together.
Run the same check locally from that CLI checkout after `pnpm build`:

```sh
RECOUP_CLI_REFERENCE_PATH=/absolute/path/to/marketing/content/docs/source/cli.mdx \
pnpm exec vitest run __tests__/publishedCommands.test.ts
RECOUP_CLI_REFERENCE_PATH=/absolute/path/to/docs/content/docs/source/cli.mdx \
pnpm exec vitest run __tests__/publishedCommands.test.ts __tests__/config.test.ts __tests__/clientRedirects.test.ts
```

This checks candidate documentation against compiled source, not an npm artifact,
Expand Down
2 changes: 1 addition & 1 deletion content/docs/manifest.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion content/docs/source/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ Get an API key from the [API Keys page](https://chat.recoupable.dev/keys) or use
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `RECOUP_API_KEY` | Yes | — | Your Recoup API key |
| `RECOUP_API_URL` | No | `https://recoup-api.vercel.app` | API base URL override; set `https://api.recoupable.dev` to use the canonical API domain |
| `RECOUP_API_URL` | No | `https://api.recoupable.dev` | API base URL override; use only an endpoint you trust with your API key |

<Note>
The default above describes the redirect-rejection [source revision `213de515`](https://github.com/recoupable/cli/commit/213de5156491e109c6b7243af4c8c17876370d93), not a verified npm release or installed client. Older CLI versions may default to `https://recoup-api.vercel.app` and follow redirects. Setting `RECOUP_API_URL` changes the initial origin; it does not add redirect rejection to an older version.

The updated GET and POST client rejects redirects before sending a request to the redirect target. A 3xx response fails with `API redirect rejected. Use a trusted API URL that does not redirect.`; request URLs, redirect locations and request details are omitted from this error. Ordinary network and API errors retain their existing behavior. Confirm the installed artifact contains this change before relying on that behavior.
</Note>

All commands support `--json` for machine-readable output and `--help` for usage info.

Expand Down
7 changes: 6 additions & 1 deletion content/docs/source/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,12 @@ recoup whoami
| Variable | Required | Default | Description |
| --- | --- | --- | --- |
| `RECOUP_API_KEY` | Yes | — | Your Recoup API key |
| `RECOUP_API_URL` | No | `https://recoup-api.vercel.app` | API base URL override; set `https://api.recoupable.dev` to use the canonical API domain |
| `RECOUP_API_URL` | No | `https://api.recoupable.dev` | API base URL override; use only an endpoint you trust with your API key |

> **Note**
> The default above describes the redirect-rejection [source revision `213de515`](https://github.com/recoupable/cli/commit/213de5156491e109c6b7243af4c8c17876370d93), not a verified npm release or installed client. Older CLI versions may default to `https://recoup-api.vercel.app` and follow redirects. Setting `RECOUP_API_URL` changes the initial origin; it does not add redirect rejection to an older version.
>
> The updated GET and POST client rejects redirects before sending a request to the redirect target. A 3xx response fails with `API redirect rejected. Use a trusted API URL that does not redirect.`; request URLs, redirect locations and request details are omitted from this error. Ordinary network and API errors retain their existing behavior. Confirm the installed artifact contains this change before relying on that behavior.

All commands support `--json` for machine-readable output and `--help` for usage info.

Expand Down
Loading