Repository navigation
fix(parser): warn when an idea needs data outside the price-volume panel - #26
Open
agenthaulk wants to merge 2 commits into
Open
agenthaulk wants to merge 2 commits into
agenthaulk wants to merge 2 commits into
Conversation
added 2 commits
July 17, 2026 01:50
full_integration_test_prompt.md: - new 4.1.1 acceptance sub-section for the Web-UI runtime LLM switch (POST /api/settings/llm): preset visibility, register+inject key, key secrecy, the base_url-redirect guard, switch-back no-regression, token gating; - section 5 gains a backend cross-check for /api/settings/llm; - the read-only surfaces + IA tab list use the renamed 已注册因子 label (internal ids lab-tab-registry/lab-panel-registry unchanged). integration_workflow.md: the 4.2 config-input checklist gains a 4b step for the runtime provider switch (preset register, base_url guard, switch-back) and notes the preset entries in the provider dropdown.
The public workbench prompt only allows a handful of price-volume formulas and the panel has no fundamental/valuation/alt-data fields, so a fundamentals idea (e.g. 年报季报利润同比) silently degraded to a confident-looking rank(return_5d) with no warning -- the no-silent-fallback contract only tripped on the rank(close) catch-all. Add out_of_scope_data_warnings(text) in specs/nl_flow (single source of the honesty contract): a curated, conservative keyword detector for fundamentals / valuation-multiple / alt-data domains the panel can't express. Both parse modes now assemble warnings through a single parse_warnings(formula, text) helper (dedup, order-preserving), so an out-of-scope idea carries an explicit review warning even when the formula is a valid non-fallback. The bare 估值 term is intentionally excluded so the built-in 低估值 demo seed keeps its existing rank(close) path. The web parse payload already surfaces parsed.warnings, so the frontend warning card shows it with no UI change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A fundamentals idea — e.g. 年报、季报利润同比增加高的公司,在未来21天的表现会更好 — parsed to a confident-looking
rank(return_5d)with no warning.Root cause is two deliberate constraints of the public workbench colliding: the panel has only price-volume fields (close/is_st/market_cap/return_/volatility_/volume — no fundamentals), and the parser system prompt allows only a handful of price-volume formulas. So an unmappable idea degrades to the nearest canned formula. The existing no-silent-fallback guard only tripped on the
rank(close)catch-all, so arank(return_5d)substitution slipped through looking confident.Fix (lightweight, honesty-only)
specs/nl_flow.out_of_scope_data_warnings(text): a curated, conservative keyword detector for data domains the panel can't express (financial statements, valuation multiples, alt-data — Chinese + English), chosen to avoid colliding with in-scope price-volume vocabulary. The bare word 估值 is deliberately excluded so the built-in 低估值 demo seed keeps its existingrank(close)path.warningsthrough oneparse_warnings(formula, text)helper (dedup, order-preserving), so an out-of-scope idea carries a review warning even when the formula is a valid non-fallback.parsed.warnings, so the frontend warning card shows it with no UI change.Tests
rank(return_5d)+ review warning, and asserts it is NOT therank(close)fallback warning);approach/broad);release_safety_scan.pypasses.