Skip to content

refactor(components): remove the empty Answer stub - #20454

Merged
yuzhichang merged 2 commits into
infiniflow:mainfrom
6ba3i:refactor/agent-answer-r1
Sep 30, 2026
Merged

yuzhichang merged 2 commits into
infiniflow:mainfrom
6ba3i:refactor/agent-answer-r1

Conversation

@6ba3i

@6ba3i 6ba3i commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Removing the fixture-only Answer stub prevents unsupported workflows from completing with an empty answer. The supported UserFillUp and Message components remain covered by compile and resume tests.

Constraint: Preserve the public internal-error envelope while removing fixture behavior.
Rejected: Keeping a no-op Answer factory | it masks unsupported production components.
Confidence: high
Scope-risk: narrow
Directive: Register only production-supported component names and test unknown names explicitly.
Tested: component and canvas tests, race tests, build, Compose, live rejection, supported resume.
Not-tested: GPU runtime.
@6ba3i
6ba3i requested a review from wangq8 September 30, 2026 07:59
@6ba3i 6ba3i added the ci Continue Integration label Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: bd01c3ce-ebbc-4b31-982c-4d2bf8e7c1a6

📥 Commits

Reviewing files that changed from the base of the PR and between fd2997b and 68bd310.

📒 Files selected for processing (1)
  • internal/handler/agent_component_test.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The fixture component registry no longer provides Answer. A compilation test checks that Answer is rejected as unknown. The checkpoint propagation test now uses Message and fails if compilation returns an error or a nil canvas. The handler test also uses Message for its no-input-form case.

Changes

Answer fixture removal

Layer / File(s) Summary
Remove Answer and update tests
internal/agent/component/fixture_stubs.go, internal/agent/component/fixture_stubs_test.go, internal/agent/canvas/compile_test.go, internal/agent/component/verify_p1_test.go, internal/handler/agent_component_test.go
The Answer fixture implementation and registration are removed. A new test checks that compilation rejects Answer as unknown. The checkpoint propagation test uses Message and fails if compilation returns an error or a nil canvas. The fixture list in a test comment is updated. The handler test uses Message while retaining its missing-input expectation.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 68bd3

No merge-blocking issue is identified in this fixture and test change.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to fd299

Unsupported workflows now fail instead of completing with an empty answer. The reviewed change narrows accepted behavior without introducing a new access path or weakening an existing control.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly established exposure change is narrower component-name acceptance: canvases naming Answer lose access to its former empty-output implementation. The external route supplying canvas definitions is not established by the available evidence.

Trust Boundaries and Controls

  • observed — Component names are resolved through the registry, and unsupported names produce an error. Answer now follows this existing rejection path before the workflow can execute; no alternate resolution or authorization bypass is introduced by its removal.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary change: removing the empty Answer component stub.
Description check ✅ Passed The description explains the purpose of the change and identifies the supported components that remain covered. It does not include the required "### Summary" heading, but the required summary informa…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the fixture gate,
No Answer waits beside the slate.
Message helps the tests proceed,
Compile confirms the path they need.
I nibble carrots, pleased and spry.

Comment @coderabbitai help to get the list of available commands.

@wangq8
wangq8 requested a review from yuzhichang September 30, 2026 08:01
Constraint: The removed Answer component cannot remain in integration fixtures.
Rejected: Preserve the Answer fixture | It now tests an unsupported component instead of input-form behavior.
Confidence: high
Scope-risk: narrow
Directive: Keep handler fixtures aligned with registered production components.
Tested: bash build.sh --test ./internal/handler/...
Not-tested: Full integration services were not rerun for this test-only correction.
@6ba3i
6ba3i force-pushed the refactor/agent-answer-r1 branch from 492e599 to 68bd310 Compare September 30, 2026 08:48
@yuzhichang
yuzhichang merged commit 267f589 into infiniflow:main Sep 30, 2026
6 checks passed
@6ba3i
6ba3i deleted the refactor/agent-answer-r1 branch October 14, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants