Skip to content

docs: add token limits configuration guide#70

Merged
spboyer merged 2 commits intosquad/59-token-limits-priorityfrom
copilot/sub-pr-64
Mar 4, 2026
Merged

docs: add token limits configuration guide#70
spboyer merged 2 commits intosquad/59-token-limits-priorityfrom
copilot/sub-pr-64

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Users had no canonical reference for how .waza.yaml tokens.limits, .token-limits.json, and built-in defaults interact — particularly after the priority inversion in #59.

Changes

  • New guide site/src/content/docs/guides/token-limits.mdx

    • Priority resolution table: .waza.yaml.token-limits.json (legacy, deprecation warning) → built-in defaults
    • Field reference for both config formats
    • Glob pattern matching rules, specificity scoring, and resolution examples
    • Migration walkthrough from .token-limits.json to .waza.yaml
  • schema.mdx — added tokens section to the .waza.yaml reference with field table and link to the guide

  • cli.mdx — added config priority note under waza tokens check with link to guide

  • astro.config.mjs — added "Token Limits" to the Guides sidebar


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…rences

Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/waza/waza/site/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update token limits priority to .waza.yaml first docs: add token limits configuration guide Mar 4, 2026
@spboyer spboyer marked this pull request as ready for review March 4, 2026 23:22
@spboyer spboyer merged commit 24fd8c1 into squad/59-token-limits-priority Mar 4, 2026
1 check passed
@spboyer spboyer deleted the copilot/sub-pr-64 branch March 4, 2026 23:22
spboyer pushed a commit to spboyer/waza-fk that referenced this pull request Mar 5, 2026
* Initial plan

* docs: add token limits configuration guide and update schema/CLI references

Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>
wbreza pushed a commit that referenced this pull request Mar 5, 2026
* Initial plan

* docs: add token limits configuration guide and update schema/CLI references

Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Mar 5, 2026
* feat: invert token limits priority to .waza.yaml first #59

resolveLimitsConfig() now checks .waza.yaml tokens.limits as the primary
source. .token-limits.json is only used as a legacy fallback when .waza.yaml
has no limits configured, and emits a deprecation warning when active.

Priority order:
  1. .waza.yaml tokens.limits (primary)
  2. .token-limits.json (legacy fallback with deprecation warning)
  3. Built-in defaults

Tests cover all four scenarios: waza-only, legacy-only, both-present
(.waza.yaml wins), and neither-present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: add token limits configuration guide (#70)

* Initial plan

* docs: add token limits configuration guide and update schema/CLI references

Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>

* fix: address PR #64 review feedback

- Fix gofmt indentation in resolveLimitsConfig (helpers.go)
- Handle overrides-only edge case in resolveLimitsConfig (helpers.go)
- Route deprecation warning through io.Writer/cmd.ErrOrStderr() (check.go)
- Route deprecation warning through cmd.ErrOrStderr() (suggest.go)
- Fix json.Marshal error handling in tests (helpers_test.go)
- Add TestResolveLimitsConfig_OverridesOnly test (helpers_test.go)
- Add TestCheck_LegacyWarningEmitted and TestCheck_NoWarningWithWazaYaml (check_test.go)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: gofmt helpers.go

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: suppress errcheck lint for stderr warning fprintf calls

Assign fmt.Fprintf return values to _ in check.go and suggest.go to
satisfy golangci-lint errcheck. These are warning messages to stderr
where ignoring the error is the standard Go pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: retrigger CI

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: richardpark-msft <51494936+richardpark-msft@users.noreply.github.com>
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.

3 participants