Skip to content

lease expirations not logged for audit (§14) #140

@nficano

Description

@nficano

Category: spec-conformance Severity: minor
Location: server/job.go:177-184
Spec: ARCP v1.1 §14

What

Spec §14 (Lease expiration clock) says implementations SHOULD log expirations for audit. expireLease terminates the job, emits the wire-side job.error, and cancels the context but never invokes opts.Logger, so operators have no audit trail of lease-expiration events.

Evidence

func (j *Job) expireLease() {
	if !j.markTerminal(messages.StatusError) { return }
	j.emitTerminalError(arcp.CodeLeaseExpired, "lease expired during execution")
	j.revokeAll()
	j.cancel()
}

Proposed fix

Emit an opts.Logger.Info (or Warn) entry from expireLease carrying at minimum job_id, principal, agent, and the lease's expires_at.

Acceptance criteria

  • Each lease expiration produces a structured log record with the job, principal, and the expiry timestamp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions