Skip to content

test(coding-agent): correct custom discovery limit contract - #3961

Merged
Yeachan-Heo merged 1 commit into
devfrom
fix/issue-provider-yaml-override-contextwindow
Aug 6, 2026
Merged

test(coding-agent): correct custom discovery limit contract#3961
Yeachan-Heo merged 1 commit into
devfrom
fix/issue-provider-yaml-override-contextwindow

Conversation

@Yeachan-Heo

Copy link
Copy Markdown
Owner

Summary

No runtime provider-discovery source changed; model configuration remains identity-scoped with no cross-id inheritance.

Verification

  • bun test packages/coding-agent/test/issue-970-custom-provider-discovery.test.ts — 3 pass, 0 fail
  • bun test packages/coding-agent/test/model-registry.test.ts --test-name-pattern "discoverable bundled replacement survives refresh" — 1 pass, 0 fail
  • bun test packages/coding-agent/test/model-registry.test.ts --test-name-pattern "modelOverrides still apply after discoverable refresh" — 1 pass, 0 fail
  • bun test packages/coding-agent/test/model-registry.test.ts --test-name-pattern "newly discovered ids inherit provider fields, not another model's custom fields" — 1 pass, 0 fail
  • bun x biome check packages/coding-agent/test/issue-970-custom-provider-discovery.test.ts
  • git diff --check

Closes #3954


[repo owner's gaebal-gajae (clawdbot) 🦞]

The issue fixture treated one configured model's limits as provider-wide defaults for unrelated discovered ids. Cover same-id YAML precedence, exact-id model overrides, and unknown fallback independently.

Lore-id: issue-3954-yaml-discovery-contract
Constraint: model configuration remains identity-scoped
Rejected: provider-wide cross-model limit inheritance | not supported by schema or runtime merge semantics
Confidence: high
Scope-risk: narrow
Reversibility: easy
Tested: focused issue regression and three nearby model-registry discovery checks

@Yeachan-Heo Yeachan-Heo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Red-team review — MERGE_READY / CLEAR

Exact head: 460285d137066278bc63d5ab275b519957bab3e1
Base: dev @ d2646cb8a (mergeable: true)

Scope (exact-head diff)

Surface Result
Files 1 onlypackages/coding-agent/test/issue-970-custom-provider-discovery.test.ts
Production / runtime code None
Commits 1 — test(coding-agent): correct custom discovery limit contract

Contract correction (not a behavior change)

The prior assertion treated sibling-discovered models as inheriting YAML fields from a different model id (deepseek-r1 expected contextWindow: 128000 / maxTokens: 8192 from qwen3.6). That is not the post-#3927 discovery contract.

Corrected contract under test:

  1. Same-id YAML wins over discovery payload (qwen3.6 keeps YAML 128000/8192 even when discovery reports context_length: 256000).
  2. modelOverrides apply per discovered id (issue-3954-override-context → 64000; issue-3954-override-max → maxTokens 4096 while keeping discovered context_length).
  3. Uncatalogued discovery-only models use UNK_CONTEXT_WINDOW / UNK_MAX_TOKENS placeholders — not hardcoded sibling inheritance.

Runtime paths (model-registry.ts, discovery, providers) are untouched. This is a test-oracle fix only.

CI evidence (exact head)

Check class Result
Affected path validation + evidence producer success
Targeted test issue-970-custom-provider-discovery.test.ts success
ts-build coding-agent success
native-build, gjc-state-gates, Telegram generation guard success
Local public surfaces failure — pre-checkout only: Failed to resolve action download infoInternal Server Error / Service Unavailable (GitHub Actions 5xx). No repository code executed. Documented infrastructure flake; not a product regression.
Windows / Python / darwin / Live release correctly skipped

Regression risk

Risk Verdict
Silent runtime change No — zero production files
Weakens discovery guarantees No — tightens oracle to real precedence (YAML same-id, modelOverrides, UNK fallbacks)
Masks #3927 breakage No — CI targeted suite green at this head against post-#3927 code

Verdict

MERGE_READY / CLEAR. Owner-authored T0 unblock. Safe to merge to dev despite Local public surfaces infrastructure 5xx.

— census red-team @ emergency audit batch

@Yeachan-Heo
Yeachan-Heo merged commit 4f6e860 into dev Aug 6, 2026
18 of 19 checks passed
Yeachan-Heo pushed a commit that referenced this pull request Aug 7, 2026
…3952)

Workflow-gate selector asks surface through session/request_permission when the
client lacks elicitation.form. Permission-mode allow still auto-approves tools;
the permission reverse channel is only used for asks (and for tool prompts when
mode is prompt). Includes cold-broker discovery reuse when a clean exit races
ownership.

Rebased onto current origin/dev after #3961 fixed the issue-970 provider baseline.
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.

1 participant