Documentation
¶
Index ¶
Constants ¶
const ( // FastCloudSyncTimeout bounds startup cloud reconciliation for read-oriented commands. FastCloudSyncTimeout = syncorch.FastCloudTimeoutCLI // NormalCloudSyncTimeout is used for background/full cloud reconciliation passes. NormalCloudSyncTimeout = syncorch.NormalCloudTimeoutCLI )
const ( ExitSuccess = 0 ExitFailed = 1 ExitNotFound = 3 )
Exit codes
const ( // FastSyncTimeout is the per-SSH-call timeout for quick syncs. // 5s tolerates slow-but-alive handshakes without making the CLI feel sluggish // on healthy paths; the overall per-host budget remains FastSyncHostTimeout. FastSyncTimeout = 5 * time.Second // FastSyncHostTimeout is the overall timeout per host for quick syncs // Must be long enough to sync multiple jobs (each with FastSyncTimeout) FastSyncHostTimeout = 30 * time.Second // NormalSyncHostTimeout is the overall timeout per host for background full syncs. // Full syncs may need to stage code, assert the agent, and fetch missing inputs. NormalSyncHostTimeout = 10 * time.Minute // DefaultSyncTimeout is used for default syncs in status commands DefaultSyncTimeout = 5 * time.Second // NormalSyncTimeout is used for explicit sync commands NormalSyncTimeout = 30 * time.Second )
Variables ¶
var Version = "dev"
Version is set at build time via -ldflags
Functions ¶
func ParseJobIDs ¶
ParseJobIDs parses command-line arguments into a deduplicated, sorted list of job IDs. Supports individual IDs (123 / wj123), ranges (123:127 / wj123:127 / wj123:wj127 / 123::127 / 123...127), and comma-separated lists (123,124,125). Prints a warning to stderr if duplicates are found.
Syntax:
- Single ID: 123 or wj123
- Range: 123:127, wj123:127, wj123:wj127, 123::127, or 123...127 (inclusive)
- List: 123,124,125
- Mixed: 123 wj125:127 130,131 (expands to 123, 125, 126, 127, 130, 131)
func ParseJobIDsForJobCommand ¶
ParseJobIDsForJobCommand parses job IDs for a command that operates only on jobs. Bare numerics (3000) and wj-prefixed IDs (wj3000) are both accepted; an explicit instance prefix (wi3000) is rejected with a clear message so an instance ID is never silently treated as a job. Because these commands have no instance counterpart, a bare number is unambiguous and need not carry a "wj" prefix.
func ResolveJobDiagnosis ¶
func ResolveJobDiagnosis(job *db.Job) *remediation.ErrorDiagnosis
ResolveJobDiagnosis falls back to a live log-cache scan when the stored diagnosis is empty so jobs that never invoked the remediation pipeline (benchmark / processed / no-retry failures) still surface a pattern. See specs/job-lifecycle.allium.
Types ¶
type IncidentSummary ¶
type IncidentSummary struct {
Fingerprint string `json:"fingerprint"`
Count int `json:"count"`
SampleJobID int64 `json:"sample_job_id"`
Message string `json:"message,omitempty"`
JobIDs []int64 `json:"job_ids"`
}
IncidentSummary captures one distinct upstream error class across multiple unplaced jobs. Exported for `--json` consumers and for the autopilot status surface that also reports active incidents.
Source Files
¶
- aliases.go
- artifact.go
- attempt_diagnostics.go
- autopilot.go
- autopilot_price_status.go
- autopilot_run.go
- blackboard.go
- budget.go
- bug.go
- bug_github.go
- build_agents.go
- cached_live_state.go
- campaign.go
- campaign_diagnose.go
- campaign_safety.go
- campaign_stats.go
- campaign_survival.go
- cancel.go
- channel.go
- check.go
- cleanup.go
- cloud.go
- cloud_helpers.go
- cloud_ops.go
- cloud_price_spread.go
- cloud_sync.go
- connection_tracker.go
- cost.go
- daemon.go
- daemon_ensure.go
- dashboard.go
- data.go
- db.go
- db_change_wait.go
- describe.go
- diagnose.go
- diagnosis_format.go
- disk_metadata.go
- draft.go
- duration_parse.go
- embed.go
- estimation.go
- estimation_eval.go
- export.go
- flag_aliases.go
- follow.go
- gpu_estimator.go
- gpu_flag.go
- hints.go
- host.go
- host_capability.go
- host_doctor.go
- host_setup.go
- id_target_routing.go
- incidents.go
- input_needs.go
- instance.go
- instance_diagnose.go
- instance_disk_report.go
- instance_launch.go
- instance_mark_credit_exhausted.go
- instance_mark_weft_bug.go
- instance_relaunch.go
- instance_watch_report.go
- job.go
- job_authorize_price.go
- job_diagnostics.go
- job_diff.go
- job_disk_calibration.go
- job_executor.go
- job_explanation_output.go
- job_ids.go
- job_mine.go
- job_mine_telemetry.go
- job_placement_diagnose.go
- job_placement_output.go
- job_repair.go
- job_repair_duplicate_attempts.go
- job_timeseries.go
- job_waiter.go
- job_watch.go
- kill.go
- kill_helpers.go
- list.go
- log.go
- mark_processed.go
- narrate.go
- narrate_cbreak_linux.go
- pause.go
- place.go
- plan.go
- predict.go
- predictor_status.go
- progress_summary.go
- project.go
- project_watch.go
- provider.go
- provider_constraints.go
- provider_diagnose_startup.go
- provider_flags.go
- provider_offers.go
- queue.go
- queue_errors.go
- queue_gate.go
- r2.go
- rebalance.go
- remote_wait_notice.go
- rental_policy_flags.go
- repair_cloud_completions.go
- replan.go
- resource_overrides.go
- restart.go
- resume.go
- retrain.go
- root.go
- run.go
- run_progress.go
- run_receipt.go
- runpod.go
- secret.go
- secret_env.go
- session_unprocessed.go
- since_parse.go
- sky.go
- slack.go
- source.go
- status.go
- sync.go
- sync_inspect.go
- tag.go
- telemetry.go
- terminal_deps.go
- tui.go
- tui_mode.go
- upload_failure_display.go
- verb_aliases.go
- watch.go
- web.go