Skip to content

fix: bound wiki reduce input growth - #2779

Open
Hughhhhcoder wants to merge 2 commits into
Tencent:mainfrom
Hughhhhcoder:fix/wiki-reduce-input-budget-2718
Open

fix: bound wiki reduce input growth#2779
Hughhhhcoder wants to merge 2 commits into
Tencent:mainfrom
Hughhhhcoder:fix/wiki-reduce-input-budget-2718

Conversation

@Hughhhhcoder

Copy link
Copy Markdown

Description

Bound the aggregate trim-eligible inputs sent to WikiPageModify with an explicit WikiConfig byte budget. This prevents hub-page reduce prompts from growing without limit while preserving deletion instructions and keeping stable source/page context where possible.

Type of Change

  • 🐛 Bug fix
  • 🧪 Test
  • 📚 Documentation update

Related Issue

Fixes #2718

Testing

  • go test ./internal/application/service -run TestTrimWikiReduceInputsBoundsConfiguredContext -count=1
  • go test ./internal/application/service -run "TestTrimWikiReduceInputsBoundsConfiguredContext|TestGenerateWithTemplateSetsMaxTokens" -count=1
  • go test ./internal/application/service -count=1
  • go test ./internal/types ./internal/application/service -count=1
  • git diff --check

go test ./... was also run; it reached the repository test execution but stopped because the host filesystem ran out of space (no space left on device), with no assertion failure reported. The focused and changed-package tests pass.

Checklist

  • git diff --check origin/main...HEAD passes
  • Changed source files are formatted
  • Targeted tests pass
  • Full-repository check: documented above as environment-blocked
  • Self-reviewed the code
  • Added regression coverage
  • Updated generated documentation

@Hughhhhcoder

Copy link
Copy Markdown
Author

The latest App and Go Lint pull-request workflow runs are completed with action_required. Could a maintainer approve the workflows when convenient so CI can run? The CodeCC scan is passing and the local focused validation is complete.

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.

[Feature]: Wiki reduce prompt has no input budget — a hub page that outgrows the model context fails permanently and cannot recover

1 participant