acceptance

package
v0.207.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package acceptance answers one question a node must answer BEFORE a job is dispatched to it: can THIS process, running as THIS identity, actually do the work its config advertises?

It exists because of two live fleet failures on 2026-07-27 that were identical in shape and invisible until job time:

  • a node whose fleet-serve ran as a different Windows account than the one that owns the harness's uv virtualenv. The venv's python.exe is a trampoline that re-execs a base interpreter under the OWNER's roaming profile, so the job died with "failed to spawn Python child process — entity not found";
  • a node whose dispatcher ran as a different Unix user than the one owning the GPU lease directory, so every job failed with "state dir ... is not writable".

Neither is detectable by stat()ing files, which is what `doctor` does — the paths existed and were readable. Both are only detectable by ATTEMPTING the thing as the running identity: execute the interpreter, write to the lease dir. That distinction is the whole point of this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Identity

func Identity() string

Identity reports the user this process runs as. It is printed on every report because both live failures were identity-dependent: the same binary, same config and same files, run by the wrong account.

Types

type Check

type Check struct {
	Name   string `json:"name"`
	Status Status `json:"status"`
	Detail string `json:"detail"`
}

Check is one verified capability.

func Runnable

func Runnable(ctx context.Context, label, bin string, args ...string) Check

Runnable verifies an interpreter or binary can be EXECUTED by this identity, by executing it. A uv virtualenv's python.exe is a small trampoline that re-execs a base interpreter elsewhere on disk; it stats fine for everyone and runs only for the account whose profile holds that base. Nothing short of running it distinguishes the two.

func WritableDir

func WritableDir(dir string) Check

WritableDir verifies a directory can be WRITTEN by this identity, by writing. Permission bits and ownership are not consulted: on Windows they are close to meaningless, and on Unix a group/ACL can grant or deny access that a bit-level reading of the mode would get wrong. The probe file is removed immediately.

type Report

type Report struct {
	Identity string  `json:"identity"`
	Ready    bool    `json:"ready"`
	Checks   []Check `json:"checks"`
}

Report is the whole verdict. Ready is false if ANY check failed — a node that is not ready must not be handed work.

func New

func New() *Report

New starts an empty, ready report for the current identity.

func (*Report) Add

func (r *Report) Add(checks ...Check)

Add appends checks to a report, keeping Ready in step.

func (Report) Failures

func (r Report) Failures() []Check

Failures returns just the failed checks (the actionable subset).

type Status

type Status string

Status is a check's outcome.

const (
	Pass Status = "PASS"
	Fail Status = "FAIL"
	Skip Status = "SKIP" // not applicable on this machine — never a failure
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL