Skip to content

feat!: record-only setup and Context HUD off by default (3.0.0) - #696

Merged
lis186 merged 5 commits into
mainfrom
feat/3.0-defaults
Oct 17, 2026
Merged

lis186 merged 5 commits into
mainfrom
feat/3.0-defaults

Conversation

@lis186

@lis186 lis186 commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary — 3.0.0 breaking defaults

#691 feat(setup)!: record-only by default, cloud export opt-in

  • Plain ccxray setup installs the Claude shell wrapper with local recording only: the owned rc block holds the wrapper, LOG_RETENTION_DAYS and CCXRAY_IMPORT_DISABLE=1. No enrollment, cursor or export variables are written, and the account/ADC/enrollment preflight is skipped, so gcloud and credentials are never touched.
  • ccxray setup --export --bucket <b> --domains <d> is the existing 2.x path, unchanged. --bucket/--domains/--prefix/--cwd-allowlist without --export exit 2.
  • Upgrades: when an owned block already exports, plain setup keeps it and prints one line explaining how to stop (setup --remove, then setup). No new disable path added.
  • setup --check reports ADC as skipped when no export is configured. setup --help, global help, README (en/zh-TW/ja), export onboarding doc, CLAUDE.md and CHANGELOG ("Breaking (3.0.0)") updated.

#692 feat(hud)!: Context HUD off by default, ccxray hud on|off|status

  • statusLine defaults to false; an explicit true in <CCXRAY_HOME>/settings.json is kept.
  • New ccxray hud on|off|status writes the same settings file the dashboard toggle uses (synchronous, atomic, only statusLine changes, refuses a non-object file). No arg / --help prints usage; unknown args exit 1. A running hub/server keeps its in-memory value until restart (the CLI says so; the dashboard toggle stays live).
  • The "Context HUD: …" line is printed only at standalone proxy startup, in the agent banner, and by hud status — not on every subcommand.

Verification

  • New test/hud.test.js (9) and 5 new test/setup.test.js cases (record-only with credential/spawn spies and a planted gcloud marker, dry run, flags without --export, upgrade keeps export, record-only → --export); all fail on main. Existing tests updated for the new defaults (--export added where export flags are passed; print-HUD e2e now opts in explicitly).
  • Locally: unit lane 2040/2040; setup/hud/cli-output/forward-proxy/print-HUD/docs-consistency 141/141.
  • Manual: standalone server on a free port with an isolated home — startup shows Context HUD: disabled, dashboard config statusLine:false; after ccxray hud on and restart, enabled / statusLine:true; ccxray status prints no HUD line; setup --dry-run writes a record-only block.

Release notes

Breaking for 3.0.0: export needs --export; HUD is off unless enabled. Homes where an older dashboard persisted statusLine: true while saving stars keep the HUD on (indistinguishable from an explicit choice).

Closes #691
Closes #692

lis186 and others added 2 commits October 17, 2026 17:47
Plain `ccxray setup` now installs the Claude shell wrapper and local
recording settings only: the owned block carries LOG_RETENTION_DAYS and
CCXRAY_IMPORT_DISABLE=1, and setup writes no export settings, enrollment
or cursor, skips the account/ADC preflight, and never reads gcloud
credentials. `--export --bucket B --domains D` keeps the 2.x behaviour;
the export-only flags are refused without --export.

An install whose owned block already exports keeps exporting when setup
is re-run without --export, with a one-line notice naming
`ccxray setup --remove` as the way to stop. `setup --check` reports the
ADC check as skipped when export is not configured. The record-only
block parses as owned, so re-runs stay byte-identical rewrites.

BREAKING CHANGE: `ccxray setup` no longer enables GCS export. Fresh
installs that want export must pass --export together with --bucket and
--domains; --bucket/--domains/--prefix/--cwd-allowlist without --export
exit 2. Existing export installs are unaffected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The HUD footer can truncate subagent returns, so a missing `statusLine`
setting now means off (settings.js DEFAULTS and the forward.js module
default). An explicit `"statusLine": true` in settings.json is kept.

New `ccxray hud on|off|status` early-exit subcommand writes the same
<CCXRAY_HOME>/settings.json the dashboard toggle uses: synchronously and
atomically, changing only `statusLine`, and refusing a file that is not
a JSON object. No argument or --help prints usage; an unknown argument
exits 1.

readSettings() no longer prints the HUD line on first load. The line is
printed only by standalone proxy startup, the standalone agent launch
banner, and `hud status`, instead of depending on a per-subcommand
quiet list.

BREAKING CHANGE: the Context HUD is no longer appended unless
settings.json has `"statusLine": true` (set by `ccxray hud on` or the
dashboard toggle). Homes where the dashboard already persisted
`statusLine: true` keep the HUD on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T10:00:39.799101Z 0f672d6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0f672d6129

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/settings.js
try { fs.unlinkSync(tmp); } catch {}
throw error;
}
_cache = null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent the running server from reverting CLI HUD changes

When ccxray hud on|off runs while a server is active, resetting _cache here affects only the short-lived CLI process; the server retains its old cached statusLine. If the user then stars a session/project or performs another settings write before restarting, server/routes/api.js reads that stale cache and writeSettings() replaces the file, undoing the CLI change, so even the promised restart will use the old value. The CLI update must be merged or otherwise protected from subsequent writes by a running process.

Useful? React with 👍 / 👎.

lis186 and others added 3 commits October 17, 2026 21:02
A re-run of `ccxray setup` without --export used to switch the whole run
into export mode when any shell already had an owned export block: it read
gcloud ADC and rewrote export-enrollment.json without --export, and with
mixed targets it either rewrote a record-only shell as an export block or
failed with "--export needs --bucket".

Export is now decided per target. Plain setup rewrites record-only blocks,
leaves export blocks byte-for-byte unchanged (no credential check, no
enrollment or cursor write) and prints a note per kept shell naming
`ccxray setup --export` and `ccxray setup --remove`. Values resolve only
from the blocks being rewritten; --export takes bucket and domains from the
existing export block.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- writeSettings re-reads settings.json and patches only the keys the caller
  changed, then refreshes the cache, so a dashboard write after
  `ccxray hud on|off` no longer reverts statusLine.
- Writes resolve a symlinked settings.json and create the tmp file next to
  the real target (owner-only, random suffix), so the link survives and a
  stale tmp never blocks a write.
- `ccxray hud status` on a settings.json that is not a JSON object reports
  it and exits 1, like `hud on|off`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	CHANGELOG.md
@lis186
lis186 merged commit c5e603b into main Oct 17, 2026
6 checks passed
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.

feat(hud)!: Context HUD off by default, add CLI toggle feat(setup)!: record-only by default, cloud export opt-in

1 participant