* test(components): replace covered ProviderNames greps with executed tests
tests/tst_provider_names.qml executes the real
ProviderNames.titleForKey with the i18n catalog stubbed to English and
pins the 17 late-added fallback titles. 16 of them are grounded in
`codexbar config providers` 0.63.0 output (z.ai / GLM, MiniMax,
Kimi Code, Moonshot / Kimi Open Platform, ElevenLabs, StepFun, Qoder,
ClawRouter, Wayfinder, Fireworks, IBM Bob, Nous Portal, Muse Code,
CodeRabbit, Replicate, Hugging Face); crossmodel has no local CLI
row yet and is pinned as the canary all the same.
Each removed assertion was proven redundant by breaking its table
entry (title literal replaced with "BROKEN") and confirming exactly
its data row goes red, then reverting:
- clawrouter/ClawRouter -> tst_provider_names (clawrouter) red
- coderabbit/CodeRabbit -> tst_provider_names (coderabbit) red
- crossmodel/CrossModel -> tst_provider_names (crossmodel) red
- elevenlabs/ElevenLabs -> tst_provider_names (elevenlabs) red
- fireworks/Fireworks -> tst_provider_names (fireworks) red
- huggingface/Hugging Face -> tst_provider_names (huggingface) red
- ibmbob/IBM Bob -> tst_provider_names (ibmbob) red
- kimi/Kimi Code -> tst_provider_names (kimi) red
- minimax/MiniMax -> tst_provider_names (minimax) red
- moonshot/Moonshot-Kimi-Open-Platform -> tst_provider_names (moonshot) red
- muse/Muse Code -> tst_provider_names (muse) red
- nous/Nous Portal -> tst_provider_names (nous) red
- qoder/Qoder -> tst_provider_names (qoder) red
- replicate/Replicate -> tst_provider_names (replicate) red
- stepfun/StepFun -> tst_provider_names (stepfun) red
- wayfinder/Wayfinder -> tst_provider_names (wayfinder) red
- zai/z.ai-GLM -> tst_provider_names (zai) red
No production code changes; git diff contents/ is empty. The now-unused
PROVIDER_NAMES_QML variable goes with the assertions (SC2034).
* test(components): replace covered detail-section greps with executed tests
tests/tst_visual_layout.qml gains test_providerDetailChartFollowsChartData,
which instantiates the real ProviderDetailSection: with chart data the
shared InteractiveChart is present, visible and carries both points;
without chart data the chart exists but stays hidden.
Each removed assertion was decided by experiment, then reverted:
- modelData.secondaryValue -> text binding emptied ->
providerDetailValuesStayWithinPopup red in 7 rows (already covered)
- InteractiveChart { -> block replaced with a bare Item ->
providerDetailChartFollowsChartData red (new test, written first)
- visible: detailSection.chartData !== null -> forced true ->
providerDetailChartFollowsChartData red on the chart-less section
(new test, written first)
- required property var modelData -> keyword dropped -> all 60 layout
tests stay green: every caller provides modelData, so the keyword is
unobservable in the harness. The scoping contract itself stays pinned
by scripts/test_ui_regressions.sh, which requires
'required property var modelData' in every Components.* delegate.
No production code changes; git diff contents/ is empty. The now-unused
PROVIDER_DETAIL_COMPONENT_QML variable goes with the assertions.
* test(components): replace covered usage-row greps with executed tests
tests/tst_visual_layout.qml gains two tests that instantiate the real
ProviderUsageRow (the test applet fake grows the five row-interface
members it was missing: showPopupPace, meterTrackHeight,
usageResetText, resetLabel, paceMarkerPercent, quotaWarningMarkers and
percentSuffix): the reset label renders the row's own reset text, and
the quota-marker repeater draws one marker per threshold the applet
reports for the row.
Each removed assertion was decided by experiment, then reverted:
- usageRow.applet.usageResetText(usageRow.rowData) -> source swapped to
usageRow.providerData -> providerUsageRowResetTextComesFromRowData red
(new test, written first)
- quotaWarningMarkerRepeater model -> model: [] ->
providerUsageRowDrawsQuotaWarningMarkers red with count 0
(new test, written first)
- id: quotaWarningMarkerRepeater -> renamed -> all 62 layout tests stay
green: the id has no references anywhere, so the token is structurally
unobservable; the marker-drawing behavior stays pinned by the new test.
No production code changes; git diff contents/ is empty. The now-unused
USAGE_ROW_COMPONENT_QML variable goes with the assertions.
* test(components): replace covered header badge grep with executed test
The provider incident badge is already executed by
tst_popup_controls.qml (incidentBadgeGrowsWithItsText), which finds the
badge label and pins its geometry — no new test needed.
- id: providerStatusBadge -> renamed consistently (declaration plus the
label's self-reference) -> all 12 popup-controls tests stay green:
the id has no references outside the component, so the token is
structurally unobservable in the harness.
- badge visible binding -> forced false ->
incidentBadgeGrowsWithItsText red, proving the badge behavior itself
stays pinned by the executed test.
No production code changes; git diff contents/ is empty. The now-unused
PROVIDER_HEADER_COMPONENT_QML variable goes with the assertion.
* test(components): replace covered accounts-delegate grep with executed test
tests/tst_visual_layout.qml gains test_accountDelegatesStaySafeKeyboardButtons,
which instantiates the real ProviderAccountsPanel with a hostile account
label and subtitle: creation itself is verified (no vacuous early return),
the delegate exposes the safe-button interface carrying the literal label
through plainText and Accessible.name, and keyboard Space selects the
account.
- delegate: PlainButton { -> delegate: Item { -> panel creation fails ->
3 tests red: accountDelegatesStaySafeKeyboardButtons (new, written
first) plus both longAccountButtonsFitAndKeepFullAccessibleNames rows
(already covered). The swap cannot compile because only PlainButton
satisfies the delegate's plainText/checkable/icon interface, so the
type choice is enforced by construction and observed by execution.
No production code changes; git diff contents/ is empty. The now-unused
PROVIDER_ACCOUNTS_PANEL_QML variable goes with the assertion.
* test(components): replace covered button delegate tooltip greps with executed tests
tst_plain_text_controls.qml already executes each removed binding with
hostile markup (activeMarkup carries an <img> probe):
- PlainButton text binding -> text: plainText segfaults the runner in
test_buttonUsesActiveStyleLabelPath (hostile markup reaches the style;
observed twice, deterministic).
- PlainCheckBox text binding -> text: plainText fails
test_otherAbstractButtonsEscapeMarkup plus 3 test_checkBoxPreservesVisibleText
rows (special-characters, literal-entities, markup).
- PlainComboBox plainText: control.textAt(index) -> plainText: "" fails
test_comboBoxDelegateEscapesMarkup.
- PlainItemDelegate text binding -> text: plainText segfaults the runner in
test_comboBoxDelegateEscapesMarkup, which renders hostile text through the
real PlainItemDelegate.
- PlainToolTip text binding -> text: plainText fails test_toolTipEscapesMarkup.
No production code changes; git diff contents/ is empty. The now-unused
PLAIN_BUTTON_QML, PLAIN_COMBO_BOX_QML and PLAIN_ITEM_DELEGATE_QML variables
go with their assertions. PLAIN_TOOL_TIP_QML stays for its reject_ raw-text
guard.
* test(components): cover inline checkbox placeholder escaping with executed tests
tst_plain_text_controls.qml gains three hostile-input cases (activeMarkup
carries an <img> probe), each written first and shown red against the same
mutation it now pins:
- test_checkBoxMnemonicLabelEscapesMarkup reads Kirigami.MnemonicData.label
through a binding mirror (the attached value is only observable from
inside the check box scope). Kirigami.MnemonicData.label: plainText ->
1 FAIL, 13 pass.
- test_inlineMessageEscapesMarkup: text: plainText in PlainInlineMessage ->
1 FAIL, 13 pass.
- test_placeholderMessageEscapesMarkup covers both text and explanation:
unescaped bindings -> 1 FAIL, 13 pass.
Removed assertions, all proven redundant by the mutations above plus the
prior commit's checkbox-text experiment (text: plainText failed
test_otherAbstractButtonsEscapeMarkup and 3 visible-text rows):
- PlainInlineMessage text binding
- PlainCheckBox text and MnemonicData.label bindings
- PlainPlaceholderMessage text and explanation bindings
No production code changes; git diff contents/ is empty. The now-unused
PLAIN_CHECK_BOX_QML variable goes with its assertions; PLAIN_INLINE_MESSAGE
and PLAIN_PLACEHOLDER_MESSAGE vars stay for their reject_ raw-text guards.
* test(components): cover plain label wrappers with executed tests
tst_plain_text_controls.qml gains test_plainLabelsStayPlainText, which
instantiates the real PlainControlsLabel, PlainPlasmaLabel and PlainHeading
with hostile markup and pins textFormat: Text.PlainText plus literal
passthrough. Written first, then shown red three times: deleting the
textFormat line from any one wrapper fails the test (14 pass, 1 fail each).
Removed assertions, each proven redundant by the matching mutation:
- PlainControlsLabel textFormat: Text.PlainText
- PlainPlasmaLabel textFormat: Text.PlainText
- PlainHeading textFormat: Text.PlainText
No production code changes; git diff contents/ is empty. The three path
variables stay for their reject_ raw-text guards.
* test(components): cover copyable and compact tooltips with executed tests
tst_visual_layout.qml gains two tests plus a whole-tree findAllItems helper
(tooltips live in resources/data, not children; findItem keeps its order):
- test_copyableValueTooltipsEscapeAndAnchorToButton instantiates the real
CopyableValue with a hostile accessible name: both PlainToolTips are
found, their text is the escaped name/confirmation, and both are
parented to the copy button. plainText: valueRow.copyAccessibleName ->
plainText: "" goes red; plainText: i18n("Copied") -> "" goes red;
parent: copyButton -> parent: valueRow goes red (64 pass, 1 fail each).
- test_compactStatusTooltipEscapesIncidentText instantiates the real
CompactRepresentation on the standalone-incident path and pins the
single status tooltip's escaped text. Removing the PlainToolTip block
goes red (64 pass, 1 fail).
Removed assertions:
- CopyableValue plainText: valueRow.copyAccessibleName
- CopyableValue plainText: i18n("Copied")
- CompactRepresentation PlainToolTip {
Kept with a stated reason (same honest outcome as PR #309's 500-char cap):
require_in_surface applet "parent: copyButton". Deleting the line is
behavior-preserving — the tooltips are declared inside the button, so the
default parent is already copyButton and the full suite stays green.
Reparenting does go red in the new layout test, and a comment in the
script records both facts.
No production code changes; git diff contents/ is empty. The now-unused
COMPACT_REPRESENTATION_QML and COPYABLE_VALUE_QML variables go with
their assertions.
* test(components): cover popup dashboard sections with executed tests
tests/test_usage_dashboard.py extracts the production providerDetailsSection
and usageDashboardSection blocks through Surface.id_block and renders them
in a generated TestCase with a fake applet and hostile dashboard data. New
QML cases: dashboard heading plus every KPI/row label renders literally,
each detail entry gets its own ProviderDetailSection, and an empty snapshot
hides both sections. Written first (green), then each fragment broken:
- id: usageDashboardSection -> renamed id: extraction fails, harness red.
- model: usageDashboardSection.kpis -> model: [] fails
test_dashboardSectionRendersKpisAndRows.
- model: usageDashboardSection.rows -> model: [] fails the same test.
- text: i18n("Usage dashboard") -> text: "Dashboard" fails the same test.
- delegate: Components.ProviderDetailSection -> delegate: Item breaks the
fixture build (providerData has nowhere to assign), harness red.
Removed assertions, each proven redundant by the matching mutation:
- require_in_surface applet "id: usageDashboardSection"
- require_in_surface applet "text: i18n(Usage dashboard)"
- require_in_surface applet "model: usageDashboardSection.kpis"
- require_in_surface applet "model: usageDashboardSection.rows"
- require_in_surface applet "Components.ProviderDetailSection"
No production code changes; git diff contents/ is empty.
* test(components): replace covered status-badge grep with extraction harness
The literal id: compactStatusBadge token is load-bearing for
scripts/test_ui_regressions.sh, which extracts that block and asserts its
fallback wiring (visible binding, badge color, border). Proved by
experiment: renaming the id to statusDot fails that extraction with
'AssertionError: missing id compactStatusBadge'. (An earlier
compactStatusBadgeRenamed attempt still matched as a substring prefix, so
the true rename was re-run to get the honest red.) Renaming also keeps the
65 tst_visual_layout rows green, confirming no QML test pins the token
itself.
Removed assertion:
- require_in_file COMPACT_COMPONENT_QML "id: compactStatusBadge"
No production code changes; git diff contents/ is empty. The now-unused
COMPACT_COMPONENT_QML variable goes with its assertion.
* test(components): cover settings dialog registration with executed test
tests/tst_config_model.qml instantiates the real contents/config/config.qml
ConfigModel and pins the full six-page source set plus the absence of the
retired About page. Written first (green), then each registered page
removed in turn: configPopup, configPanel, configNotifications and
configDiagnostics removals each fail
test_settingsDialogRegistersItsPages (2 pass, 1 fail each).
Removed assertions, each proven redundant by the matching removal:
- require_in_file CONFIG_QML "configPopup.qml"
- require_in_file CONFIG_QML "configPanel.qml"
- require_in_file CONFIG_QML "configNotifications.qml"
- require_in_file CONFIG_QML "configDiagnostics.qml"
Kept per the absence rule, with a comment saying so:
- reject_in_file CONFIG_QML "configAbout.qml"
- reject_in_file CONFIG_QML "name: i18n(About)"
No production code changes; git diff contents/ is empty.
* test(components): replace covered panel providerColor grep with extraction
The require_in_surface panel signature pin is redundant: the same script's
Python section extracts Surface(panel).function_body(providerColor) and
asserts it reads the shared brand table with a theme-highlight fallback.
Proved by experiment on PanelSettingsPreview.qml: renaming the function
(and its single caller) to providerColour keeps all 8
tst_panel_preview_surface rows green, while check-theme-boundaries still
fails — 'AssertionError: missing function providerColor( in surface panel'
from the extraction, verified with the signature line temporarily removed.
Removed assertion:
- require_in_surface panel "function providerColor(value)"
No production code changes; git diff contents/ is empty.
* test(components): document kept SessionsView path rejections
No assertion change: reject_in_file SESSIONS_COMPONENT_QML transcriptPath
and cwd stay per the absence rule (absence has no runtime equivalent; the
view carries no filesystem paths). Records the reason inline, matching the
kept-assertion comments elsewhere in these scripts.
* test(components): replace covered cost-view greps with executed tests
CostTrustNotice, InteractiveChart, ProjectCostSection, ProviderCostSection,
SpendView: 22 removed after experiment, 1 kept with a stated reason.
No production file changes; git diff contents/ is empty.
New executed tests, each shown red against the same mutation first:
- tests/tst_interactive_chart.qml: test_lineKindPlotsThroughLineGeometry
(line charts plot through the applet line geometry, not the bar path)
and test_plotIsReachableByTab (the plot stays in the tab chain).
- tests/test_cost_sections.py: three render tests instantiating the real
ProjectCostSection, ProviderCostSection and SpendView with a stub applet
delegating to the real CostPresentation.js.
Evidence, per removed assertion (mutation -> red test):
InteractiveChart:
- if (chart.kind == "line") responses -> "spline": line test red.
- activeFocusOnTab: true -> false: tab test red (+9 keyboard tests).
- Keys.onPressed neutralized: 7 pre-existing keyboard tests red.
- onPositionChanged emptied: 5 pre-existing hover tests red.
ProjectCostSection / SpendView project wiring:
- Components.ProjectCostSection -> Item: spend test red (no project rows).
- providerCosts: presented -> raw: spend test red (Extra marker gone).
- projectRows(..., flag) -> false: project test red (token order lost).
- model: section.projectData.rows -> []: project test red.
- i18n(Cost unavailable) -> Gone, in ProjectCostSection and in
ProviderCostSection amountText: respective test red.
ProviderCostSection:
- Components.InteractiveChart -> Item: provider test red.
- id renames (costHistoryChartSection, costDrillDownSection): provider
test red (history value / drilldown rows gone).
- drilldown/history models -> []: provider test red (Total tokens, M1,
history value gone).
- chart accessibleTitle frozen on cost: provider test red.
- onCostHistoryShowsTokensChanged dropped: provider test red (day
selection survives the metric flip).
- provider metric combo no longer tracks the flag: provider test red.
SpendView:
- metricOptions() -> []: spend test red (no 2-option combo).
- setCostHistoryMetric call dropped: spend test red (setter uncalled).
- spendHistoryStillBuilding() -> false: spend test red (notice hidden).
- InteractiveChart -> Item: spend test red.
- Activity heatmap relabelled: spend test red.
- token branch of the no-history wording frozen: spend test red.
- spend chart accessibleTitle frozen on cost: spend test red.
Security:
- Components.PlainToolTip -> Item in SpendView: spend test red
(unknown plainText breaks fixture creation).
Kept with reason (breaking mutation stays green):
- process-lifecycle interval: 0 (CostTrustNotice coalescing timer):
0 -> 50 keeps the whole cost suite green (test_cost_sections,
test_cost_context, test_provider_cost_presentation, 159
tst_cost_presentation and 14 tst_interactive_chart cases), so no
executed test can pin the bound. Kept with a comment as the only pin
on the coalescing restart.
Verification: make check-feature-parity, check-process-lifecycle,
check-security-regressions, check-shellcheck, check-qml-logic,
check-qml-hardening and check-python-test_cost_sections green.
check-python-lint is skipped (pyflakes absent; CI installs it). Full
make check left to the orchestrator.
* test(controllers): replace covered sessions and accounts greps with executed tests
Fourteen source-text pins on the tail controllers are covered by executed
tests; each was proven redundant by breaking the described behavior and
watching a test go red. One pin is kept with a stated reason. No production
code changes.
Removed from scripts/test_process_lifecycle.sh:
- "running: controller.sending": running:false leaves a send pending and
test_realDeadlineAndRecovery (transport) goes red on `sending`.
- "lifecycle.expire(Date.now())": expire(0) never retires a deadline;
the same test goes red.
- import AccountRequests.js: renamed import fails component creation;
the accounts suite goes red.
- import SessionRefreshPolicy.js: renamed import; the sessions suite
goes red.
- accountCommandTimeoutMs 60000: 60000->120000 lets the 62s late fixture
succeed, so test_timeoutKeepsDataAndAllowsRetry goes red on the missing
timeout error.
- sessionsCommandTimeoutMs 60000: 60000->120000; the sessions timeout
test goes red the same way.
- notificationCommandTimeoutMs 10000: 10000->1000 retires the deadline in
~2s; test_realDeadlineAndRecovery goes red on its 9.9s lower bound.
- pollIntervalMs 60000: 60000->500 refires the checksum; the new
test_minute_poll_does_not_refire_quickly goes red (3 runs in 2.5s).
- interval controller.pollIntervalMs: hardwired interval 500; the same
new test goes red.
Removed from scripts/test_feature_parity.sh:
- function command(providerID): dropping --all-accounts makes the
exact-args CLI fixture reject every load; the accounts suite goes red.
- sessions --json-v2: ---json-v2 to ---json; the CLI rejects argv and the
sessions suite goes red.
- SessionResponse.response(stdoutText, stderrText): swapped arguments
misclassify every reply; the sessions suite goes red.
Removed from scripts/test_refresh_nonce.sh:
- withRunNonce(commandSource, runSerial): a bare commandSource drops the
run nonce, the fixture CLI crashes without CODEXBAR_PLASMA_RUN, and the
sessions suite goes red. Its cost/sessions comment went with the pin.
- var sourceName withRunNonce(command, runSerial): a bare command
collapses concurrent sends onto one source; test_concurrentAndLateReplies
and test_immediateRepliesAndRepeatedMessages go red.
Kept in scripts/test_process_lifecycle.sh:
- "interval: 0": unobservable in executed tests. 0->3600000 keeps the
sessions and accounts suites green; 0->200 segfaults qmltestrunner in
teardown after every verdict passes, which no committed test can pin.
The existing Kept comments stay as the only surface pin.
New coverage: tests/test_provider_config_watcher.py gains
test_minute_poll_does_not_refire_quickly, running the production watcher
against a counting checksum command. Shown green on production and red
against both watcher mutations above. No extension was needed in the
sessions, accounts, dispatcher, cli-update or managed-cli suites: every
other mutation already went red there.
Verification: make check-feature-parity, check-process-lifecycle and
check-refresh-nonce pass; ShellCheck passes; pyflakes absent (skipped, CI
installs it). Full watcher, dispatcher, sessions and accounts suites pass.
git diff contents/ is empty.
* test(components): wait for the chart paint instead of assuming it
test_lineKindPlotsThroughLineGeometry passed when tst_interactive_chart.qml
ran alone and failed under `make check`, where the runner shares a process
with the rest of the suite: one waitForRendering pass is not guaranteed to
have painted the canvas, so the line-geometry call had not been recorded yet.
tryVerify waits for the call instead, matching tst_panel_preview_surface.qml
and tst_panel_settings_geometry.qml. The assertion is unchanged; only the
assumption that a single render pass is enough is gone.
Verified: green alone and green under `make check-qml-logic`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>13 files changedLine totals unavailable