Repository navigation
app/: a stored visualci.yml that no longer validates is never dropped silently - #158
Open
ndbroadbent wants to merge 1 commit into
Open
ndbroadbent wants to merge 1 commit into
ndbroadbent wants to merge 1 commit into
Conversation
VisualCIdocspring/visualci · build #346 · 1 changed, 360 unchanged · approved by visualci features agent for Nathan Broadbent
This PR vs base: 15 changed, 20 added since #269, across 3 builds
docspring/visualci · journeys · build #344 · 28 unchanged · no changes This PR vs base: 14 changed, 14 added since #268, across 3 builds Updated as builds change. Agents can review with VisualCI's MCP tools. |
ndbroadbent
force-pushed
the
app-config-never-silent
branch
from
December 4, 2026 02:56
3146279 to
3b5e01f
Compare
… is refused by uploads and early comparisons, and shows as a warning on builds compared before; never dropped silently
ndbroadbent
force-pushed
the
app-config-never-silent
branch
from
December 4, 2026 03:31
3b5e01f to
9164da5
Compare
This branch has not been deployed
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.
A build's stored visualci.yml that the server can no longer parse is never dropped silently any more. Until now,
BuildSettings::newlogged a warning and treated it as absent, so the build ran with the project's settings and nobody knew.Design
BuildSettings::new(project, build)now returnsResult<Self, ConfigInvalid>, so every caller has to decide what to do with a stored file that doesn't parse. The compiler enforces it: there's no path left that drops the file quietly. The error saysvisualci.yml no longer validates: <field>: <problem>; send the build again.build_settings::parse_configreads the file throughserde_path_to_error, so messages name the field (threshold: …,pdf: unknown fieldcolour…,ignore[0]: missing fieldsnapshots). Creation's `validate_config` uses the same parser, so creation and later reads always agree. The only answer this changes is the create_build golden (`visualci.yml: ignore[0]: missing field `snapshots).processing::process). It sets statefailed, conclusionfailed,error_codeconfig_invalid,error= the message andcompleted_at, then drops queued renders. Theerrorshows up in get_build, on the build page ("Build error") and as the check's title (failure).POST /builds/{id}/snapshots,POST /builds/{id}/compare(compare_now) and MCPupload_snapshots. Failing beats a warning here: the build can't be compared correctly, which is the same reason creation refuses bad input.get_snapshot/show_snapshot's "against previous", text pages, the check's ci_mode) useBuildSettings::shown. It falls back to the project's settings, but that fallback is never silent:build_settings::warnings_of(build)adds "visualci.yml no longer validates: …" to the front of the build's warnings, in every view (APIwarnings, get_buildwarnings, the build page, the check summary). This covers builds compared before a later, stricter version. A build that failed for this reason doesn't repeat it as a warning.hides_more_than): the build is compared with the project's settings and gets a warning naming the base build.error(**Error:**) and the build's warnings (**Warning:**). Before, only the title (the first clause) said why a build failed, and warnings never reached the check.Tests
app/tests/processing.rs:a_stored_config_that_no_longer_validates_fails_the_build_and_names_the_field:{"threshold": "not a number"}(400,visualci.yml: threshold: …);{"threshold": "not a number"}(written to the database) gets refused by compare and snapshot uploads, then fails at finalize witherror_codeconfig_invalidand the message. get_build shows it, the check state is failure with that title, and the summary has it in full;pdf(deny_unknown_fields) fails, namingpdfandcolour;a_stored_fractional_threshold_by_glob_validates_and_applies: fleetlayer's and quietdeck's raw stored{"threshold": {"**": 0.1}}passesBuildSettings::newunder the app's build (arbitrary_precision on), applies 0.1 to a snapshot when the project's threshold is 0, and the build completes with no warnings.VisualCI build
Expect one changed JSON snapshot: the create_build golden for
a_builds_visualci_yml_overrides_the_project_settings(the error now namesignore[0]). Screenshots shouldn't change: the frontend is untouched, and the seeded builds have no stored file.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.