Skip to content

Define secure installer defaults - #636

Open
n33miaz wants to merge 2 commits into
developfrom
feature/627-installer-settings
Open

n33miaz wants to merge 2 commits into
developfrom
feature/627-installer-settings

Conversation

@n33miaz

@n33miaz n33miaz commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Set CI as the installer package source and default to the prerelease channel until the first stable installer ships. Document how to select stable.
  • Remove the placeholder download URL and the signature toggle. Require signed manifest verification and per-file SHA-256 checks before installation.
  • Validate the shipped TOML in the launcher suite and reject obsolete source and signature keys, malformed settings, and unsafe install paths.

Verification

  • cargo test --locked -p ads-launcher installer_defaults_tests passed all 5 tests. The shipped-file test also rejected the previous defaults.
  • cargo test --locked -p ads-launcher passed all 69 tests.
  • Formatting and the local prohibited-terms scan passed.

Acceptance checklist

  • P1, P2, P8 ??? One documented TOML contract covers the installer defaults and supported values.
  • P3, P4 ??? Manifest verification is mandatory, and validation rejects obsolete settings and unsafe paths.
  • P5, P6, P7 ??? The installer guide records the rollback path and the planned clean-install success and readiness measures.

Windows CI coverage

Changes to defaults/installer.toml trigger the launcher-windows job because the launcher tests embed this file. The six CI path-filter tests and 18 dependency-check tests passed with the corrected filter.

Closes #627

Signed-off-by: Neemias Cormino Manso <[email protected]>
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes add documented installer defaults and TOML validation tests. The tests check required settings, supported values, and safe relative install paths. Installer documentation updates package and manifest status, and CI path filtering includes the defaults file.

Changes: Installer Defaults

Layer / File(s) Summary
Installer settings and typed config
defaults/installer.toml, crates/launcher/src/installer_defaults_tests.rs
The TOML file defines package source, channel, install directory, shortcut, and file-organization defaults. The test config model requires typed settings and rejects unknown fields.
Parsing and validation
crates/launcher/src/installer_defaults_tests.rs, crates/launcher/src/verify.rs
The parser validates install paths using safe_relative_path. Tests cover shipped defaults, stable channel selection, missing or mistyped settings, legacy fields, and invalid values.
Test entry points, documentation, and CI
crates/launcher/src/main.rs, tools/test_installer_defaults.py, docs/installer.md, .github/workflows/ci.yml
The Rust test module and Python wrapper run the defaults tests. The documentation updates package and manifest status. CI path filtering includes the defaults file.

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

Change: Feature

Possibly related issues

  • Issue 605 — The PR adds the requested installer defaults and validates install paths. It does not implement the requested per-user install layout or safe uninstall.

Suggested reviewers: claude

Merge Risk: Minimal · up to f052f

This change adds documented installer defaults and tests that validate them, and it updates the docs and the CI path filter. It does not change runtime behavior, and no merge-blocking risk was found.

Architecture risk: Low · up to f052f

Installer settings moved from a documented future configuration to a shipped defaults contract with test-only validation.

Changed areas: crates/launcher, defaults, docs, tools

Review details

Systems and components

  • observed — 3 changed files mapped to crates/launcher.
  • observed — 1 changed file mapped to defaults.
  • observed — 1 changed file mapped to docs.
  • observed — 1 changed file mapped to tools.
Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description covers the main changes: CI as the package source, the prerelease default, removal of the placeholder URL and signature toggle, new TOML validation, and the reported test runs. It also… Restructure the description to follow the repository template: add 'O que mudou', 'Por que', 'Como testar', and 'Checklist' sections, in that order. Keep the template's Portuguese headings or confirm the repository's language rule. Replace …
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title "Define secure installer defaults" matches the main change: adding defaults/installer.toml with secure-leaning installer defaults and validating them in the launcher test suite. It is short,…
Linked Issues check Passed Issue #627 requires defaults/installer.toml per ADR 0029 (P8), with documented defaults and explanations for package source, install directory, shortcuts, and the file organization toggle, plus TOML…
Out of Scope Changes check Passed The changed files implement the installer configuration contract that #627 requests:
- defaults/installer.toml: the required configuration file.
- crates/launcher/src/installer_defaults_tests.rs a…
Full details: Title check

Explanation

The title "Define secure installer defaults" matches the main change: adding defaults/installer.toml with secure-leaning installer defaults and validating them in the launcher test suite. It is short, specific, and in English. It omits the test and validation work, which is acceptable.

Full details: Linked Issues check

Explanation

Issue #627 requires defaults/installer.toml per ADR 0029 (P8), with documented defaults and explanations for package source, install directory, shortcuts, and the file organization toggle, plus TOML validation tests.

Evidence at the reviewed head (f052ff0):

  • defaults/installer.toml defines package_source (ci), package_channel (prerelease), install_dir_relative (ai-develop-setup), create_start_menu_shortcut (true), create_desktop_shortcut (false), and file_organization_enabled (false). Each key has a comment that states its purpose and default. The comments also explain how to select stable and that manifest signature and per-file SHA-256 are required.
  • crates/launcher/src/installer_defaults_tests.rs loads the shipped file and parses it through InstallerConfig. The change summary reports tests for the shipped defaults, stable selection, missing or mistyped settings, legacy keys, and invalid sources, channels, and install paths.
  • crates/launcher/src/main.rs registers the test module.

The PR description also lists signed-manifest enforcement, SHA-256 checks, rollback, and clean-install measures. #627 does not require these, so this assessment does not treat them as #627 requirements. The change summary shows no runtime installation code for these checks. The PR description's claims therefore do not add a #627 coding requirement.

Limits: the ADR 0029 text was not read. The assessment relies on the issue text, the file comments, and the change summary. The test results were not re-run.

Full details: Out of Scope Changes check

Explanation

The changed files implement the installer configuration contract that #627 requests:

  • defaults/installer.toml: the required configuration file.
  • crates/launcher/src/installer_defaults_tests.rs and crates/launcher/src/main.rs: the TOML validation tests and their module registration.
  • crates/launcher/src/verify.rs: changes safe_relative_path from private to pub(super) so the test module can validate install_dir_relative. The validation logic is unchanged.
  • docs/installer.md: points the documented settings to defaults/installer.toml and updates the package and manifest status. It removes the configuration file from the missing-items list.
  • tools/test_installer_defaults.py: runs the Rust installer_defaults_tests through Cargo, so the validation tests run in the Python test flow.
  • .github/workflows/ci.yml: adds defaults/installer.toml to LAUNCHER_PATHS so changes to the file trigger the launcher job. This supports the file's validation.

The change summary shows no runtime changes to manifest signature or SHA-256 enforcement. The PR description's broader claims appear as comments and rejected legacy keys in the TOML contract. These claims relate to the same configuration contract and do not add unrelated work. No change was found that is unconnected to #627.

Full details: Description check

Explanation

The description covers the main changes: CI as the package source, the prerelease default, removal of the placeholder URL and signature toggle, new TOML validation, and the reported test runs. It also links issue #627. It does not follow the repository template. The required sections 'O que mudou', 'Por que', 'Como testar', and 'Checklist' are replaced by 'Summary', 'Verification', and 'Acceptance checklist'. The Portuguese template headings and the P1–P8 checklist items are not used as written. The acceptance checklist uses '???' in place of the separators, which looks like an encoding problem. The 'testes rodados' and personal-data checks are not stated explicitly. The 'Why' rationale is only partly covered by the objectives. The description is mostly complete in content but needs structural and wording fixes to match the template.

Resolution

Restructure the description to follow the repository template: add 'O que mudou', 'Por que', 'Como testar', and 'Checklist' sections, in that order. Keep the template's Portuguese headings or confirm the repository's language rule. Replace the '???' characters in the acceptance checklist with the intended separators. Map each P1–P8 item to the template checklist, and tick or explicitly address the 'testes rodados' and 'sem dados pessoais' items. Explain why the prerelease default and the removal of the signature toggle were chosen. Keep the 'Closes #627' line. Add a short note on the rollback path and the planned success and readiness measures, or link the installer guide section that covers them.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0c48879 and f052ff0.

Files selected for processing: 1

  • .github/workflows/ci.yml

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

Signed-off-by: Neemias Cormino Manso <[email protected]>
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.

Add defaults/installer.toml with documented parameters

1 participant