Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
export-worker
command
Command export-worker is anvilkit-export-worker: the stateless, queue-driven Go worker that owns the AnvilKit export stage.
|
Command export-worker is anvilkit-export-worker: the stateless, queue-driven Go worker that owns the AnvilKit export stage. |
|
contracts
|
|
|
artifact
Package artifact contains Go bindings for artifact-manifest.json — the canonical description of one deployment's static artifact bundle (PRD 0008 §9.2; FR-012).
|
Package artifact contains Go bindings for artifact-manifest.json — the canonical description of one deployment's static artifact bundle (PRD 0008 §9.2; FR-012). |
|
assetservice
Package assetservice contains Go bindings for the asset-service internal API (consumed contract).
|
Package assetservice contains Go bindings for the asset-service internal API (consumed contract). |
|
deploymentservice
Package deploymentservice contains Go bindings for the deployment-service internal API (consumed contract).
|
Package deploymentservice contains Go bindings for the deployment-service internal API (consumed contract). |
|
events
Package events contains Go bindings for the versioned AnvilKit platform event contracts (contracts/events/v1).
|
Package events contains Go bindings for the versioned AnvilKit platform event contracts (contracts/events/v1). |
|
internal
|
|
|
buildinfo
Package buildinfo carries the service identity (ADR-015 canonical naming) and the build-time version stamp.
|
Package buildinfo carries the service identity (ADR-015 canonical naming) and the build-time version stamp. |
|
config
Package config owns configuration loading for all PRD 0010 §14 environment variables with startup fail-fast validation (FR-019, EW-CONFIG-001): a misconfigured worker refuses to boot (CONFIG_MISSING class) and never starts jobs.
|
Package config owns configuration loading for all PRD 0010 §14 environment variables with startup fail-fast validation (FR-019, EW-CONFIG-001): a misconfigured worker refuses to boot (CONFIG_MISSING class) and never starts jobs. |
|
deployment
Package deployment owns the worker-side wrapper around the generated deploymentservice bindings (FR-004, FR-006; EW-DEPLOY-001..003/005): authoritative record load with event-hint reconciliation, CAS status transitions restricted to the worker-owned targets, DEPLOYMENT_SERVICE_* error classification, and the terminal / non-actionable state decisions that gate acks.
|
Package deployment owns the worker-side wrapper around the generated deploymentservice bindings (FR-004, FR-006; EW-DEPLOY-001..003/005): authoritative record load with event-hint reconciliation, CAS status transitions restricted to the worker-owned targets, DEPLOYMENT_SERVICE_* error classification, and the terminal / non-actionable state decisions that gate acks. |
|
emit
Package emit owns outcome-event construction and emission (FR-013, EW-EVENT-001..003): deployment.artifact.ready after the CAS to ARTIFACT_READY succeeds, deployment.export.failed after a terminal failure.
|
Package emit owns outcome-event construction and emission (FR-013, EW-EVENT-001..003): deployment.artifact.ready after the CAS to ARTIFACT_READY succeeds, deployment.export.failed after a terminal failure. |
|
errclass
Package errclass owns job-level error classification (FR-014; PRD 0010 §13, PRD 0008 §12.2): every failure carries a registry error code, the pipeline stage where it occurred (trace-span vocabulary), and a retryable / non-retryable classification that drives the retry-vs-fail branch.
|
Package errclass owns job-level error classification (FR-014; PRD 0010 §13, PRD 0008 §12.2): every failure carries a registry error code, the pipeline stage where it occurred (trace-span vocabulary), and a retryable / non-retryable classification that drives the retry-vs-fail branch. |
|
export
Package export implements the Exporter seam with the full M3 pipeline (PRD 0010 §5.1 stages render_html → harvest_dependencies → upload_artifacts → write_manifest → submit_artifact → update_status_ready → emit_ready): fetch version-pinned HTML, harvest dependencies deterministically, upload hashed artifacts, write the internal-only manifest, submit the pointer (BD-004 interim semantics), CAS EXPORTING → ARTIFACT_READY, and emit deployment.artifact.ready (CAS-then-emit, FR-013).
|
Package export implements the Exporter seam with the full M3 pipeline (PRD 0010 §5.1 stages render_html → harvest_dependencies → upload_artifacts → write_manifest → submit_artifact → update_status_ready → emit_ready): fetch version-pinned HTML, harvest dependencies deterministically, upload hashed artifacts, write the internal-only manifest, submit the pointer (BD-004 interim semantics), CAS EXPORTING → ARTIFACT_READY, and emit deployment.artifact.ready (CAS-then-emit, FR-013). |
|
harvest
Package harvest owns render output guards, deterministic dependency harvesting, allowlist enforcement, and path safety (FR-008, FR-009, FR-010; EW-ARTIFACT-001..006).
|
Package harvest owns render output guards, deterministic dependency harvesting, allowlist enforcement, and path safety (FR-008, FR-009, FR-010; EW-ARTIFACT-001..006). |
|
jsonschema
Package jsonschema is a minimal JSON Schema (draft 2020-12 subset) validator covering exactly the keywords used by the frozen contracts: type, properties, required, additionalProperties, enum, const, pattern, minLength, minimum, maximum, items.
|
Package jsonschema is a minimal JSON Schema (draft 2020-12 subset) validator covering exactly the keywords used by the frozen contracts: type, properties, required, additionalProperties, enum, const, pattern, minLength, minimum, maximum, items. |
|
lock
Package lock owns the per-deploymentId distributed lock (FR-005, EW-LOCK-001..004): SET lock:deployment:{deploymentId} {workerId} NX PX with TTL = renderTimeout + uploadTimeout + 60s (min 90s), heartbeat renewal while the job runs, and owner-checked release.
|
Package lock owns the per-deploymentId distributed lock (FR-005, EW-LOCK-001..004): SET lock:deployment:{deploymentId} {workerId} NX PX with TTL = renderTimeout + uploadTimeout + 60s (min 90s), heartbeat renewal while the job runs, and owner-checked release. |
|
obs
Package obs owns observability and lifecycle: structured JSON logging with the required job-scoped fields (PRD 0010 §15.1) and secret redaction (EW-CONFIG-005), the full Prometheus metric baseline in the anvilkit_export_worker_* namespace (ADR-015, EW-OBS-002) including the §15.4 alert feeds, OpenTelemetry per-job spans (§15.3 vocabulary) with trace context forwarded to render-origin (EW-OBS-003), the internal-only health/readiness/metrics endpoints on ports 8081/9091 (FR-018), and the worker lifecycle state reflected by the readiness probe — including the DRAINING state the SIGTERM graceful drain flips through (FR-017).
|
Package obs owns observability and lifecycle: structured JSON logging with the required job-scoped fields (PRD 0010 §15.1) and secret redaction (EW-CONFIG-005), the full Prometheus metric baseline in the anvilkit_export_worker_* namespace (ADR-015, EW-OBS-002) including the §15.4 alert feeds, OpenTelemetry per-job spans (§15.3 vocabulary) with trace context forwarded to render-origin (EW-OBS-003), the internal-only health/readiness/metrics endpoints on ports 8081/9091 (FR-018), and the worker lifecycle state reflected by the readiness probe — including the DRAINING state the SIGTERM graceful drain flips through (FR-017). |
|
queue
Package queue owns the queue driver abstraction and its Redis Streams MVP implementation (FR-003, FR-014, FR-016; ADR-003 five-mechanism model):
|
Package queue owns the queue driver abstraction and its Redis Streams MVP implementation (FR-003, FR-014, FR-016; ADR-003 five-mechanism model): |
|
render
Package render owns the render-origin HTTP client (FR-007, EW-RENDER-001..004): version-pinned page fetch with the bearer token and all seven X-AnvilKit-* pinning headers, same-origin dependency fetch for the harvester, response classification per PRD 0010 §8.3, and the RENDER_TIMEOUT_MS budget.
|
Package render owns the render-origin HTTP client (FR-007, EW-RENDER-001..004): version-pinned page fetch with the bearer token and all seven X-AnvilKit-* pinning headers, same-origin dependency fetch for the harvester, response classification per PRD 0010 §8.3, and the RENDER_TIMEOUT_MS budget. |
|
storage
Package storage owns the S3-compatible artifact adapter (FR-011, EW-STORAGE-001..004: MinIO locally; S3/R2/OSS/COS in production) and the artifact-manifest builder (FR-012, EW-STORAGE-005/006).
|
Package storage owns the S3-compatible artifact adapter (FR-011, EW-STORAGE-001..004: MinIO locally; S3/R2/OSS/COS in production) and the artifact-manifest builder (FR-012, EW-STORAGE-005/006). |
|
testsupport
Package testsupport provides integration-test infrastructure.
|
Package testsupport provides integration-test infrastructure. |
|
worker
Package worker wires the job pipeline (PRD 0010 §5.1): consume → validate → load record → reconcile → lock → CAS EXPORT_QUEUED→EXPORTING → Exporter seam (render/harvest/upload/manifest/emit live in internal/export).
|
Package worker wires the job pipeline (PRD 0010 §5.1): consume → validate → load record → reconcile → lock → CAS EXPORT_QUEUED→EXPORTING → Exporter seam (render/harvest/upload/manifest/emit live in internal/export). |
Click to show internal directories.
Click to hide internal directories.