Skip to content

Docs

Osty policy reference

.osty/policy.yaml is one strict YAML document with apiVersion: osty.io/v1 and kind: FleetPolicy. Six sections are required and releaseGates is optional. Unknown keys, quoted booleans and a second document are rejected, and LLM code edits can never exceed VERIFIED_PR. Check a file with osty policy validate before you commit it.

Written by Osty EngineeringPublished Updated

Top-level keys of a FleetPolicy document
KeyRequiredGoverns
apiVersion, kindYesMust be osty.io/v1 and FleetPolicy.
supplyChainYesCooldowns, blocked verdicts, licenses, proxy failure modes and private packages.
cadenceYesThe maintenance train and which severities skip it.
ciGovernorYesConcurrent campaign runs and CI budget shares.
autonomyYesThe default autonomy level, per-tier caps and canary gates.
patchVerifierYesAgentic migrations, forbidden paths and dependency rules.
killSwitchYesFreezes, rollback and dual control.
releaseGatesNoFreeze windows and ServiceNow, Jira or webhook approvals.
Validate the policy before you commit it
osty policy validate .osty/policy.yaml

What does a complete policy look like?

This is the fleet policy the Osty test suite pins. It caps TIER_0 at VERIFIED_PR, lets TIER_1 auto-merge deterministic changes and lets TIER_2 roll out behind a canary gate.

.osty/policy.yamlyaml
apiVersion: osty.io/v1
kind: FleetPolicy

supplyChain:
  defaultCooldownHours: 48
  fastTrackVerifiedKEV: true
  blockVerdicts:
    - CONFIRMED_MALICIOUS
    - QUARANTINED_HIGH_RISK
  blockLicenseChanges: true
  allowedLicenses: [MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MPL-2.0]
  proxyFailureMode:
    prodCI: FAIL_CLOSED
    devLaptop: FAIL_OPEN_WITH_CACHE

cadence:
  maintenanceTrain:
    schedule: "every Tuesday 09:00 UTC"
    coalesceSeverities: [MEDIUM, LOW]
  fastTrackSeverities: [CRITICAL, HIGH]

ciGovernor:
  maxConcurrentCampaignRuns: 10
  routineBudgetPercent: 20
  kevBurstBudgetPercent: 60
  flakeControlRerun: true

autonomy:
  defaultTier: VERIFIED_PR
  canaryDefaults:
    soakMinutes: 30
    maxErrorRateDeltaPct: 1.0
    maxP99DeltaPct: 20
    zeroOOMKills: true
  tiers:
    TIER_0:
      maxAutonomy: VERIFIED_PR
      requireObservabilityGate: true
    TIER_1:
      maxAutonomy: AUTO_MERGE_SAFE
      allowStaleMainAutoRedeploy: false
      requireObservabilityGate: true
      canarySoakMinutes: 15
      canaryMaxErrorRateDeltaPct: 0.5
      canaryMaxP99DeltaPct: 15
      canaryZeroOOMKills: true
    TIER_2:
      maxAutonomy: CANARY_ROLLOUT
      allowStaleMainAutoRedeploy: true

patchVerifier:
  allowAgenticCodeMigrations: true
  agenticMigrationMaxAutonomy: VERIFIED_PR
  forbiddenPaths:
    - ".github/workflows/**"
    - ".circleci/**"
    - "**/Makefile"
    - "**/auth/**"
    - "**/iam/**"
  forbidUnlistedDependencies: true
  forbidNewShellOrNetworkPrimitives: true

killSwitch:
  autoFreezeProxyOnConfirmedMalicious: true
  autoRollbackStatelessWorkloads: true
  statefulMigrationAction: CONTAIN_AND_FORWARD_REBUILD
  requireDualControlForBroadRollback: true
Validate itbash
osty policy validate .osty/policy.yaml
Output, exit 0text
valid osty.io/v1 FleetPolicy digest=sha256:87433aefdeae2d0b8d61cfe0ed7523a82977299520fed2aaa72b1f74b1942fe7

The digest is the sha256 of the file bytes. osty-edge records it when it pins the policy, so any edit, including whitespace, produces a new digest.

What is the smallest safe starting policy?

Every required key still has to be present. This version opens no pull requests (OBSERVE), fails closed on every origin and keeps agentic migrations off. tiers: {} means every tier uses defaultTier.

Observe-only .osty/policy.yamlyaml
apiVersion: osty.io/v1
kind: FleetPolicy

supplyChain:
  defaultCooldownHours: 24
  fastTrackVerifiedKEV: true
  blockVerdicts: [CONFIRMED_MALICIOUS, QUARANTINED_HIGH_RISK]
  blockLicenseChanges: false
  allowedLicenses: []
  proxyFailureMode:
    prodCI: FAIL_CLOSED
    devLaptop: FAIL_CLOSED

cadence:
  maintenanceTrain:
    schedule: "every Monday 08:00 UTC"
    coalesceSeverities: [MEDIUM, LOW]
  fastTrackSeverities: [CRITICAL, HIGH]

ciGovernor:
  maxConcurrentCampaignRuns: 2
  routineBudgetPercent: 10
  kevBurstBudgetPercent: 30
  flakeControlRerun: false

autonomy:
  defaultTier: OBSERVE
  tiers: {}

patchVerifier:
  allowAgenticCodeMigrations: false
  agenticMigrationMaxAutonomy: OBSERVE
  forbiddenPaths: []
  forbidUnlistedDependencies: true
  forbidNewShellOrNetworkPrimitives: true

killSwitch:
  autoFreezeProxyOnConfirmedMalicious: true
  autoRollbackStatelessWorkloads: false
  statefulMigrationAction: CONTAIN_ONLY
  requireDualControlForBroadRollback: true

What do the autonomy levels allow?

AutonomyLevel values, lowest to highest
LevelWhat Osty may doExtra requirement
OBSERVEReport findings. Opens no pull requests.None.
VERIFIED_PROpen verified pull requests that a person merges.None. The ceiling for LLM-generated code edits.
AUTO_MERGE_SAFEMerge deterministic changes on green CI: lockfiles, @sha256 base-image pins and mechanical compiler AST codemods.With allowStaleMainAutoRedeploy: true, also redeploy, which needs the observability gate and a canary gate.
CANARY_ROLLOUTMerge and roll out behind the canary gate, rolling back on regression.requireObservabilityGate: true and a canary gate from the tier or autonomy.canaryDefaults.
  • A tier that is not listed under autonomy.tiers uses defaultTier with the observability gate required.
  • When no observability gate is wired, CANARY_ROLLOUT and stale-main redeploys fall back to VERIFIED_PR at run time. AUTO_MERGE_SAFE without redeploy is unaffected.
  • autonomy.canaryDefaults is required as soon as any tier, or defaultTier, permits automated rollout.

How is LLM-generated code capped at VERIFIED_PR?

patchVerifier.agenticMigrationMaxAutonomy accepts only OBSERVE or VERIFIED_PR. The parser rejects a higher value in the fleet policy, in an overlay and in the merged result, so a person always reviews and merges probabilistic code edits.

agenticMigrationMaxAutonomy: AUTO_MERGE_SAFE is rejected, exit 1text
osty policy: policy has 1 validation issue(s):
  patchVerifier.agenticMigrationMaxAutonomy: AUTO_MERGE_SAFE exceeds VERIFIED_PR: probabilistic LLM-generated code edits are hard-capped at VERIFIED_PR and always require human review; only deterministic changes (lockfiles, @sha256 base-image pins, mechanical compiler AST codemods) may reach AUTO_MERGE_SAFE or CANARY_ROLLOUT

Which keys does each section accept?

Booleans must be YAML true or false, enum values are case-sensitive, and list entries must be unique. A key marked required must be present even when it holds the default you want.

supplyChain

Keys under supplyChain
KeyTypeRequiredRule
defaultCooldownHoursintegerYes0 to 8760 hours a new version waits before it is pulled.
fastTrackVerifiedKEVbooleanYesLets verified fixes for known-exploited CVEs skip the cooldown.
blockVerdictslistYesCLEAN, ANOMALOUS_REVIEW, QUARANTINED_HIGH_RISK or CONFIRMED_MALICIOUS.
blockLicenseChangesbooleanYesBlocks versions whose license changed.
allowedLicenseslistYesSPDX identifiers. [] turns the allowlist off.
proxyFailureMode.prodCIenumYesFAIL_CLOSED or FAIL_OPEN_WITH_CACHE for pulls without a verdict from CI.
proxyFailureMode.devLaptopenumYesThe same choice for developer laptops.
privatePackageAllowlistlistNoEntries with ecosystem, name, allowedDomains and an optional reason. Domains must be concrete, with no wildcards or schemes.

cadence

Keys under cadence
KeyTypeRequiredRule
maintenanceTrain.schedulestringYesevery <Weekday> <HH:MM> UTC or a five-field cron expression.
maintenanceTrain.coalesceSeveritieslistYesSeverities batched onto the train.
fastTrackSeveritieslistYesSeverities that skip the train. Together with coalesceSeverities they must cover CRITICAL, HIGH, MEDIUM and LOW exactly once.

ciGovernor

Keys under ciGovernor
KeyTypeRequiredRule
maxConcurrentCampaignRunsintegerYesAt least 1.
routineBudgetPercentintegerYes0 to 100 percent of CI capacity for routine bumps.
kevBurstBudgetPercentintegerYes0 to 100 percent of CI capacity for known-exploited fixes.
flakeControlRerunbooleanYesReruns failing checks on the base commit to separate flakes from regressions.
safeVerifyWorkflowslistNoWorkflows Osty may run to verify its branches even when the CI classifier marks them SIDE_EFFECT_POSSIBLE.

autonomy

Keys under autonomy
KeyTypeRequiredRule
defaultTierautonomy levelYesLevel for every tier not listed under tiers.
canaryDefaultsmapWhen rollout is permittedsoakMinutes (1 to 43200), maxErrorRateDeltaPct (0 to 100), maxP99DeltaPct (0 or more) and optional zeroOOMKills (default true).
tiersmapYesKeys TIER_0 to TIER_3. {} is allowed.
tiers.<tier>.maxAutonomyautonomy levelYesHighest level for the tier.
tiers.<tier>.requireObservabilityGatebooleanNoDefaults to true. Must be true when the tier permits automated rollout.
tiers.<tier>.allowStaleMainAutoRedeploybooleanNoDefaults to false. Lets Osty redeploy a stale workload from main once the fix is merged.
tiers.<tier>.canarySoakMinutesintegerNoOverrides canaryDefaults.soakMinutes.
tiers.<tier>.canaryMaxErrorRateDeltaPctnumberNoOverrides canaryDefaults.maxErrorRateDeltaPct.
tiers.<tier>.canaryMaxP99DeltaPctnumberNoOverrides canaryDefaults.maxP99DeltaPct.
tiers.<tier>.canaryZeroOOMKillsbooleanNoOverrides canaryDefaults.zeroOOMKills.

patchVerifier

Keys under patchVerifier
KeyTypeRequiredRule
allowAgenticCodeMigrationsbooleanYesAllows LLM code migrations in zero-network sandboxes.
agenticMigrationMaxAutonomyautonomy levelYesOBSERVE or VERIFIED_PR only.
forbiddenPathslistYesRepository-relative globs no patch may touch. .gitlab-ci.yml, .gitlab/ci/** and **/*.gitlab-ci.yml are always forbidden.
forbidUnlistedDependenciesbooleanYesRejects patches that add dependencies outside the campaign's authorized dependency set.
forbidNewShellOrNetworkPrimitivesbooleanYesRejects patches that add shell or network calls.

killSwitch

Keys under killSwitch
KeyTypeRequiredRule
autoFreezeProxyOnConfirmedMaliciousbooleanYesFreezes a CONFIRMED_MALICIOUS artifact in every proxy.
autoRollbackStatelessWorkloadsbooleanYesRolls back stateless workloads that run a CONFIRMED_MALICIOUS artifact.
statefulMigrationActionenumYesCONTAIN_AND_FORWARD_REBUILD or CONTAIN_ONLY.
requireDualControlForBroadRollbackbooleanYesBroad rollbacks need two operator signatures from osty dual-control sign.

releaseGates

Keys under releaseGates
KeyTypeRequiredRule
freezeWindows[].nameslugYesLowercase letters, digits and hyphens, at most 63 characters, unique.
freezeWindows[].start, endRFC3339One-off windowsend must be after start.
freezeWindows[].schedule, durationMinutescron, integerRecurring windowsDuration 1 to 44640 minutes. Cannot be combined with start and end.
freezeWindows[].appliesToTierslistNoOmit to cover every tier.
freezeWindows[].allowKEVOverridebooleanNoLets known-exploited fixes through. Defaults to false.
freezeWindows[].reasonstringYesMust not be blank.
externalApprovalGates[].providerenumYesSERVICENOW, JIRA or WEBHOOK.
externalApprovalGates[].appliesToActionslistYesOPEN_PR, MERGE_PR or REDEPLOY.
externalApprovalGates[].appliesToTierslistNoOmit to cover every tier.
externalApprovalGates[].failClosedbooleanYesMust be true.
externalApprovalGates[].maxSignalAgeMinutesintegerYes1 to 10080. Older approvals do not count.
A releaseGates section to append to the complete policyyaml
releaseGates:
  freezeWindows:
    - name: year-end-freeze
      start: "2026-12-19T00:00:00Z"
      end: "2027-01-04T00:00:00Z"
      appliesToTiers: [TIER_0, TIER_1]
      allowKEVOverride: true
      reason: "Year-end change freeze"
    - name: weekend-freeze
      schedule: "0 18 * * FRI"
      durationMinutes: 3840
      appliesToTiers: [TIER_0]
      reason: "No weekend production changes"
  externalApprovalGates:
    - name: servicenow-cab
      provider: SERVICENOW
      appliesToTiers: [TIER_0]
      appliesToActions: [MERGE_PR, REDEPLOY]
      failClosed: true
      maxSignalAgeMinutes: 240

What does the parser reject?

  • Unknown keys at any depth, so a typo such as supplyChian fails instead of being ignored.
  • Quoted booleans such as "true", and numbers where a boolean is expected.
  • More than one YAML document, an empty file or a file over 1 MiB.
  • A missing required key, even when its value would be the default.
  • A tier that permits automated rollout with requireObservabilityGate: false, or with no canary gate.
  • An external approval gate with failClosed: false, which would let a missing or forged approval through.
Three of those failures, each exit 1text
osty policy: malformed policy document: line 6: "true" is not a boolean; use true or false
osty policy: malformed policy document: yaml: unmarshal errors:
  line 27: field maxRetries not found in type policy.ciGovernorDocument
osty policy: policy has 1 validation issue(s):
  autonomy.tiers.TIER_2.requireObservabilityGate: must be true because maxAutonomy CANARY_ROLLOUT with allowStaleMainAutoRedeploy true permits automated production rollout

How do repository overlays tighten the fleet policy?

The fleet policy is the complete document osty-edge pins with --policy. A repository can add an overlay, listed as policyOverlayPath under repositories in the edge runtime config. An overlay is a partial FleetPolicy document. It is merged with the fleet policy before every command, and a merge that loosens any value is rejected.

Tighten-only merge rules for repository overlays
KeyAn overlay may
autonomy levels and agenticMigrationMaxAutonomyLower them, never raise them.
defaultCooldownHours, canary soakLengthen them.
Canary error-rate and p99 tolerancesLower them.
proxyFailureModeMove from FAIL_OPEN_WITH_CACHE to FAIL_CLOSED, never back.
blockVerdicts, forbiddenPathsAdd entries. The result is the union.
allowedLicensesNarrow the list. An empty intersection is rejected.
blockLicenseChanges, requireObservabilityGate, zeroOOMKills, forbid* rules, autoFreezeProxyOnConfirmedMalicious, requireDualControlForBroadRollbackTurn them on, never off.
fastTrackVerifiedKEV, allowStaleMainAutoRedeploy, allowAgenticCodeMigrationsTurn them off, never on.
privatePackageAllowlist, safeVerifyWorkflowsKeep a subset of the fleet entries.
cadence, ciGovernor budgets, autoRollbackStatelessWorkloads, statefulMigrationActionMatch the fleet value exactly.

osty policy validate checks complete documents only. With --control-url and --runtime-config, osty-edge serve merges every overlay with the pinned fleet policy at startup and refuses to start if one loosens it.

Frequently asked questions

Is fleet-policy.yaml a different format?

No. There is one schema, kind: FleetPolicy. The fleet policy is the complete document the edge pins, wherever you store it. .osty/policy.yaml is the conventional path in a repository.

Can a repository raise its own autonomy?

No. Overlays may only tighten. A higher autonomy level, a weaker failure mode or a dropped gate is rejected with the key path that loosened.

Can LLM code changes ever auto-merge?

No. agenticMigrationMaxAutonomy is capped at VERIFIED_PR by the parser, by overlay validation and by the merge itself.

Is the policy file executable?

No. It is data only. Release gates use declared providers such as SERVICENOW rather than shell hooks.

See your fleet in 10 minutes

Connect a read-only GitHub App and cloud role. Osty installs nothing in your environment and writes nothing to your repositories, and the report shows false positives, stale deploys and unowned workloads.