Skip to content

docs(proxy): correct --code-aware default to disabled#1710

Merged
chopratejas merged 1 commit into
headroomlabs-ai:mainfrom
Parideboy:docs/1700-code-aware-default
Jul 2, 2026
Merged

docs(proxy): correct --code-aware default to disabled#1710
chopratejas merged 1 commit into
headroomlabs-ai:mainfrom
Parideboy:docs/1700-code-aware-default

Conversation

@Parideboy

Copy link
Copy Markdown
Contributor

Description

The wiki proxy page (wiki/proxy.md, which feeds the published docs site) claimed --code-aware defaults to true. The CLI deliberately defaults it to disabled: headroom/cli/proxy.py resolves the paired flag to off unless --code-aware is passed or HEADROOM_CODE_AWARE_ENABLED is truthy, and the Click help text plus docs/content/docs/proxy.mdx and wiki/cli.md already document it as disabled. This PR aligns the one remaining stale table row and collapses the self-contradictory separate --no-code-aware row into a single paired-flag entry, matching the style used in docs/content/docs/proxy.mdx.

Fixes #1700

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Performance improvement
  • Code refactoring (no functional changes)

Changes Made

  • wiki/proxy.md: replaced the two flag-table rows claiming --code-aware default true / --no-code-aware default false with one --code-aware / --no-code-aware row documenting the actual default (disabled), the headroom-ai[code] requirement, and the HEADROOM_CODE_AWARE_ENABLED=1 env opt-in.

Testing

  • Unit tests pass (pytest)
  • Linting passes (ruff check .)
  • Type checking passes (mypy headroom)
  • New tests added for new functionality
  • Manual testing performed

Test Output

$ python -c "
from click.testing import CliRunner
from headroom.cli.proxy import proxy
r = CliRunner().invoke(proxy, ['--help'])
print([l.strip() for l in r.output.splitlines() if 'code-aware' in l][0])
"
--code-aware / --no-code-aware  Enable/disable AST-based code compression.

$ grep -n "code-aware" wiki/proxy.md
77:| `--code-aware` / `--no-code-aware` | disabled | Enable or disable AST-based code compression. Requires `headroom-ai[code]` (env: HEADROOM_CODE_AWARE_ENABLED=1 to enable) |

Real Behavior Proof

  • Environment: Windows 11, local checkout at upstream/main (9fbd47b), Python 3.13.
  • Exact command / steps: headroom proxy --help (via Click test runner) to confirm the CLI help says "Default: disabled"; inspected headroom/cli/proxy.py flag resolution (explicit flag → HEADROOM_CODE_AWARE_ENABLED → off); grep -rn "code.aware" wiki/ docs/ to find every doc stating a default.
  • Observed result: CLI default is disabled; docs/content/docs/proxy.mdx:61 and wiki/cli.md:255-256 already say disabled/off; only wiki/proxy.md:77-78 claimed true. After the change the table matches actual behavior.
  • Not tested: rendered docs-site build (content-only table edit).

Review Readiness

  • I have performed a self-review
  • This PR is ready for human review

The wiki proxy flag table claimed --code-aware defaults to true, but the
CLI deliberately defaults it off (headroom/cli/proxy.py resolves the flag
to disabled unless --code-aware or HEADROOM_CODE_AWARE_ENABLED is set).
Align the table with the actual behavior and the other docs
(docs/content/docs/proxy.mdx, wiki/cli.md), and collapse the
self-contradictory --no-code-aware row into the paired-flag entry.

Fixes headroomlabs-ai#1700

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR governance

This PR follows the template and is marked ready for human review.

@github-actions github-actions Bot added the status: ready for review Pull request body is complete and the author marked it ready for human review label Jul 2, 2026

@JerrettDavis JerrettDavis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Docs review looks good. The wiki table now matches the CLI's paired --code-aware / --no-code-aware behavior and the existing docs that describe code-aware compression as disabled unless explicitly enabled.

@chopratejas chopratejas merged commit 1fc5e3d into headroomlabs-ai:main Jul 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready for review Pull request body is complete and the author marked it ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Default value for --code-aware is false, regardless the documentation

3 participants