User Story
As an interCEde contributor (and as DiracX, the first consumer),
I want the contract implemented as typed, async, capability-segmented Protocols with their
data types and exception hierarchy,
So that backends, fakes and consumers can all be written against one enforced contract instead of
DIRAC's abstract-by-convention base class.
Feature Description
Implement IC-ADR-001 §1–§2, §4 (types only), §7 — the whole Tier-A surface, no real backends:
- Protocols (
@runtime_checkable, async, bulk): essential Submitter, Monitor →
JobBackend; optional OutputRetriever (with destructive: bool), Cancellable, Purgeable,
LoadReporter, SupportsLiveDiagnostics; collaborator protocols Transport, Scheduler
(shapes only — implementations come in issues 10–12).
- Data types:
SubmissionSpec (with the reserved optional tag field), Submission
(.handles + .failures), JobHandle/JobID (serialisable, routing-carrying), JobStatus
(incl. UNKNOWN), StatusMap, JobOutput (manifest: .stdout/.stderr/.files/.log),
OpOutcome, JobCounts, Diagnostics, Resources, FileRef, OutputSpec.
- Exceptions: rootable
InterCEdeError hierarchy (whole-operation failures only; per-item
failures ride the outcome maps).
- Package hygiene:
src/intercede/ with explicit __all__ per public module, py.typed,
strict mypy in CI; Tier-C modules _-prefixed.
- Unit conformance suite + in-memory
FakeBackend: proves the contract is trivially
implementable/mockable; becomes the template for the Phase-2 integration contract suite.
- Implement the three contract rules added to the ADR after the review pass (all now decided
in IC-ADR-001): (a) backend/transport lifecycle — async context managers, cheap side-effect-free
construction, idempotent close (§2); (b) JobCounts stays counts-only — verified sufficient for
the remote family (Open Issues); (c) file ownership — submit() never retains caller-owned
paths after return (§4; kills DIRAC's ExecutableToKeep).
Definition of Done
Alternatives Considered
Covered by IC-ADR-001 Rejected Ideas (fat base, god-interface, sync API, ObjectLoader, reuse of
PSI/J/SAGA/blahp/Harvester/JAliEn).
User Story
As an interCEde contributor (and as DiracX, the first consumer),
I want the contract implemented as typed, async, capability-segmented Protocols with their
data types and exception hierarchy,
So that backends, fakes and consumers can all be written against one enforced contract instead of
DIRAC's abstract-by-convention base class.
Feature Description
Implement IC-ADR-001 §1–§2, §4 (types only), §7 — the whole Tier-A surface, no real backends:
@runtime_checkable, async, bulk): essentialSubmitter,Monitor→JobBackend; optionalOutputRetriever(withdestructive: bool),Cancellable,Purgeable,LoadReporter,SupportsLiveDiagnostics; collaborator protocolsTransport,Scheduler(shapes only — implementations come in issues 10–12).
SubmissionSpec(with the reserved optionaltagfield),Submission(
.handles+.failures),JobHandle/JobID(serialisable, routing-carrying),JobStatus(incl.
UNKNOWN),StatusMap,JobOutput(manifest:.stdout/.stderr/.files/.log),OpOutcome,JobCounts,Diagnostics,Resources,FileRef,OutputSpec.InterCEdeErrorhierarchy (whole-operation failures only; per-itemfailures ride the outcome maps).
src/intercede/with explicit__all__per public module,py.typed,strict mypy in CI; Tier-C modules
_-prefixed.FakeBackend: proves the contract is triviallyimplementable/mockable; becomes the template for the Phase-2 integration contract suite.
in IC-ADR-001): (a) backend/transport lifecycle — async context managers, cheap side-effect-free
construction, idempotent close (§2); (b)
JobCountsstays counts-only — verified sufficient forthe remote family (Open Issues); (c) file ownership —
submit()never retains caller-ownedpaths after return (§4; kills DIRAC's
ExecutableToKeep).Definition of Done
intercede,__all__-exportedisinstancenarrowing works against all@runtime_checkableprotocolsFakeBackendpasses the unit conformance suite (submit/status/fetch/kill, partial-failuremaps,
UNKNOWNfor unknown ids)JobCounts, and submit-time file-ownershiprules implemented as specified in the amended IC-ADR-001
Alternatives Considered
Covered by IC-ADR-001 Rejected Ideas (fat base, god-interface, sync API, ObjectLoader, reuse of
PSI/J/SAGA/blahp/Harvester/JAliEn).