Skip to content

fix(schema): model bootstrap services - #12790

Draft
risu729 wants to merge 1 commit into
jdx:mainfrom
risu729:schema/bootstrap-services
Draft

fix(schema): model bootstrap services#12790
risu729 wants to merge 1 commit into
jdx:mainfrom
risu729:schema/bootstrap-services

Conversation

@risu729

@risu729 risu729 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • model bootstrap system service declarations
  • mirror unit-name, state, enabled, and masked constraints from runtime
  • keep service management separate from Compose project configuration

Validation

  • mise run render:schema
  • schema formatting and JSON validation

Split from #12529. This PR is independent and can be reviewed or merged in any order with the sibling bootstrap schema PRs.

Related split

All scopes are independent and target main; no merge order is required:

AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.

Summary by CodeRabbit

  • New Features
    • Added configuration support for managing Linux systemd services.
    • Services can now be configured for running or stopped states, enabled or disabled startup behavior, masking, and actions triggered by configuration changes.
    • Service names are validated, and masked services must explicitly be stopped and disabled to ensure consistent configuration.

Entire-Checkpoint: 01M1Q4Z0R152DDNYGMD4TR6T7C
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: f9282bf4-9337-448e-9033-1dd41e822749

📥 Commits

Reviewing files that changed from the base of the PR and between e2925ed and a768b44.

📒 Files selected for processing (1)
  • schema/mise.json

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The schema adds bootstrap.services for Linux systemd service lifecycle settings. It defines service state, boot enablement, masking, and change-triggered actions. It validates unit names and enforces explicit stopped and disabled values for masked services.

Changes

Systemd Service Configuration

Layer / File(s) Summary
Service lifecycle schema
schema/mise.json
Adds bootstrap.services with state, enabled, masked, and on_change fields. It validates systemd unit names and masked-service constraints.

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

Merge Risk: ⚪ Minimal · up to a768b

This adds validated bootstrap configuration for systemd service state, enablement, masking, and change actions. The schema enforces incompatible masked-service settings, with no current merge-blocking risk identified.

Suggested reviewers: jdx, jambalaya56562

Poem

I’m a rabbit with services tucked neat,
Systemd states now march to their beat.
Stopped when masked, disabled at dawn,
Unit names checked before they move on.
Bootstrap settings hop into place,
With reloads and restarts in the chase.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the schema change for bootstrap services and matches the main pull request objective.

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

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

@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds JSON Schema coverage for system-level bootstrap service declarations.

  • Models systemd unit-name restrictions and lifecycle properties.
  • Mirrors runtime defaults for state, enablement, masking, and change notifications.
  • Enforces the runtime’s masked-service compatibility constraints.
  • Leaves service entries permissive to unknown fields, reducing typo detection.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking schema-hardening issue that allows misspelled service properties to pass validation.

The modeled paths, values, defaults, and conditional constraints match the runtime, but omitting additionalProperties: false means the schema cannot catch lifecycle-field typos that the runtime silently ignores.

Files Needing Attention: schema/mise.json

Important Files Changed

Filename Overview
schema/mise.json Adds an accurate bootstrap-services schema, but the individual service objects do not reject unsupported properties.

Reviews (1): Last reviewed commit: "fix(schema): model bootstrap services" | Re-trigger Greptile

Comment thread schema/mise.json
"pattern": "^[A-Za-z0-9_.@:][A-Za-z0-9_.@:-]{0,254}$",
"description": "systemd unit name: at most 255 ASCII letters, digits, '.', '_', '@', ':' or '-', not starting with '-'"
},
"additionalProperties": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unknown Fields Pass Validation

The per-service object allows arbitrary properties. A typo such as stat = "stopped" therefore passes schema validation, but ServiceTomlConfig silently ignores it and uses the default running state. Add "additionalProperties": false so the schema catches unsupported lifecycle fields.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 1 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

This PR currently has failing checks. If this continues for 7 days, it will be closed automatically.

This is warning day 2 of 7.

Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it.

This comment was generated by an automated workflow.

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.

1 participant