You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat!: remove resource-read -o json from cfl
JSON is reserved for round-trip payloads and control-plane envelopes
per cli-common docs/output-and-rendering.md §2. Today's surviving JSON
surface is cfl set-credential --json (control-plane envelope, §1.5.2);
no resource command emits JSON.
The global -o/--output flag now accepts only {table, plain}; -o json,
-o yaml, or any other value errors uniformly at the root prerun
("invalid output format: \"json\" (valid formats: table, plain)"),
before config or keyring work runs. 23 JSON branches across page/,
space/, attachment/, search/ (including create/edit/delete/upload
mutation-success renderers) are deleted along with their tests and
docs/examples. me/ had no production JSON branch; only its fixture is
removed.
BREAKING CHANGE: cfl <resource> -o json now errors. Scripts that piped
"cfl page create -o json | jq -r '.id'" can extract the ID from the
default text output via "awk -F': ' '/^ID:/ {print $2}'"; the bundled
roundtrip-test.sh is updated in this PR to use that pattern.
Closes#392
* test+docs: add local-flag smoke test; inline-mark obsolete JSON rows
- TestRoot_LocalJSONFlag_NotRejectedByOutputGuard pins the invariant
that the root's closed-set output guard does not interfere with
child-command local boolean --json flags (set-credential's §1.5.2
control-plane envelope).
- Inline-mark obsolete JSON rows in integration-tests.md and
test-plan-writes.md with ~~strikethrough~~ + #392 so the matrix
itself signals which rows now error rather than relying on the
top-of-file banner alone.
- Replace the page-create ID-capture row's command with the awk-based
text-output parser (matches the updated roundtrip-test.sh).
* test: assert attachment empty-result banners now always print
#392 removed the `opts.Output != "json"` skip from attachment/list.go
so the 'No attachments found.' / 'No unused attachments found.'
stderr banners now print unconditionally. Pin that with assertions on
TestRunList_Empty and TestRunList_UnusedFlag_NoUnused.
* test+docs+script: real-root set-credential test; harden awk; fix obsolete row expecteds
Daemon feedback (PR #396):
- Add TestSetCredential_ThroughRealRoot_LocalJSONFlagPreserved which
dispatches set-credential --json through root.NewCmd() with the
production PersistentPreRunE chain wired. Prior probe-stub test in
root_test.go covers the general invariant; this version exercises
the exact production path so a future regression in
PersistentPreRunE + set-credential interaction is caught.
- Harden roundtrip-test.sh ID extraction: capture create_output first
(no more '|| true' masking non-zero exit codes), then run awk with
gsub-based whitespace trim so 'ID: 12345' / 'ID:\t12345' still
yield '12345'. Failure paths now include the raw cfl output.
- Update the 'Expected Result' cells of the inline-marked obsolete
rows in integration-tests.md to say 'Errors: invalid output format'
instead of stale 'Valid JSON array' / 'Valid JSON object' text.
Copy file name to clipboardExpand all lines: docs/ARTIFACT_CONTRACT.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ Some commands expose a `--raw` mode for source-faithful content where transforma
60
60
61
61
## Output Format
62
62
63
-
JTK uses text-first output. The `-o json/plain/table` flag has been removed from JTK (CFL retains it). JTK commands render through presenters; `automation export` is the only command that emits JSON directly.
63
+
JTK and CFL both use text-first output. The `-o json` resource surface has been removed from both tools (JTK earlier, then CFL via #392); CFL retains `-o table` and `-o plain` only. Both tools render through presenters; JSON is reserved for control-plane envelopes (`cfl set-credential --json`, `jtk set-credential --json`) and round-trip payloads (`jtk automation export`).
64
64
65
65
**Text output modes:**
66
66
- Default = focused output for human and agent consumption (defined per-command)
Copy file name to clipboardExpand all lines: tools/cfl/integration-tests.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
This document catalogs the manual integration test suite for `cfl`. These tests verify real-world behavior against a live Confluence instance and catch edge cases that are difficult to cover with unit tests.
4
4
5
+
> **#392 update:** Rows that exercise `-o json` / `--output json` on resource commands are obsolete — the resource JSON surface has been removed. They now error at the root with `invalid output format: "json" (valid formats: table, plain)`. Skip those rows. The surviving JSON surface is `cfl set-credential --json` (control-plane envelope per cli-common §1.5.2); test that one normally.
6
+
5
7
## Auth Methods
6
8
7
9
cfl supports two authentication methods. The full integration test suite should be run with both:
@@ -61,7 +63,7 @@ All cfl commands should work with both auth methods (no scope limitations for Co
61
63
|-----------|---------|-----------------|
62
64
| List pages in space |`cfl page list --space confluence`| Shows table of pages with ID, title, status, version |
63
65
| List with limit |`cfl page list --space confluence --limit 5`| Shows only 5 pages with "showing first N results" message |
0 commit comments