fix(tests): rewrite smoke.sh with 4 known fixes from PR #40 canary #764

Closed
opened 2026-06-08 23:09:24 +02:00 by ollama · 1 comment
Collaborator

Spec sources (whitelist)

  • tests/smoke.sh — current smoke test
  • PR #40 discussion — 4 known bugs identified during canary review
  • modules/n8n-worker/module.yaml — reference for correct digest extraction pattern
  • modules/*/module.yaml — representative modules to test against

Extracted context

PR #40 (smoke.sh rewrite) was closed without merge after canary identified 4 real bugs:

  1. Drift detection compares {{.Image}} (local config ID) instead of registry digest — n8n-worker drift detection may have been false-positive
  2. Container name hardcoded home-platform-${compose_service}-1 — but agaria-, agent-plane-shadow-, hermes-* use different prefixes
  3. Python deps fragile on homelab (pyyaml + jsonschema rot risk)
  4. Dead code read_field shipped unused

Operator decision (2026-05-03): revert + rewrite.

Scope

Rewrite tests/smoke.sh from scratch incorporating all 4 fixes:

  1. Use registry digest comparison (docker inspect --format '{{index .RepoDigests 0}}') instead of {{.Image}}
  2. Source container name prefix from module manifest (runtime.orchestrator + runtime.compose_service) or support multiple prefix patterns
  3. Use Python json module + subprocess instead of pyyaml/jsonschema to avoid dependency rot
  4. Remove dead code; keep only actually-used functions

Reference pattern from n8n-worker runbook: yq '.spec.runtime.image_observed' modules/<name>/module.yaml for digest source (no copy-paste failure modes).

Acceptance criteria

  • Drift detection uses registry digest, not local image ID
  • Container name detection works for all prefix patterns (home-platform-, agaria-, agent-plane-shadow-, hermes-)
  • Python deps: only stdlib (json, subprocess) or already-available tools (yq, jq)
  • No dead code
  • Tested against 3+ representative modules (core, user-app, custom-prefix)

Do NOT read

  • Full repo — only current smoke.sh + module manifests needed for testing

Agent notes

  • Recommended executor: Gemini 3.1 Pro (careful rewrite needed)
  • Size: Medium (~150 LOC)
  • Review tier: tier/medium (touches production smoke testing)
  • Audit ref: state/audit/deepseek-2026-06-08-multiperspective.md §T1
## Spec sources (whitelist) - `tests/smoke.sh` — current smoke test - PR #40 discussion — 4 known bugs identified during canary review - `modules/n8n-worker/module.yaml` — reference for correct digest extraction pattern - `modules/*/module.yaml` — representative modules to test against ## Extracted context PR #40 (smoke.sh rewrite) was closed without merge after canary identified 4 real bugs: 1. **Drift detection compares `{{.Image}}` (local config ID) instead of registry digest** — n8n-worker drift detection may have been false-positive 2. **Container name hardcoded `home-platform-${compose_service}-1`** — but agaria-*, agent-plane-shadow-*, hermes-* use different prefixes 3. **Python deps fragile** on homelab (pyyaml + jsonschema rot risk) 4. **Dead code `read_field` shipped unused** Operator decision (2026-05-03): revert + rewrite. ## Scope Rewrite `tests/smoke.sh` from scratch incorporating all 4 fixes: 1. Use registry digest comparison (`docker inspect --format '{{index .RepoDigests 0}}'`) instead of `{{.Image}}` 2. Source container name prefix from module manifest (`runtime.orchestrator` + `runtime.compose_service`) or support multiple prefix patterns 3. Use Python `json` module + `subprocess` instead of pyyaml/jsonschema to avoid dependency rot 4. Remove dead code; keep only actually-used functions Reference pattern from n8n-worker runbook: `yq '.spec.runtime.image_observed' modules/<name>/module.yaml` for digest source (no copy-paste failure modes). ## Acceptance criteria - [ ] Drift detection uses registry digest, not local image ID - [ ] Container name detection works for all prefix patterns (home-platform-*, agaria-*, agent-plane-shadow-*, hermes-*) - [ ] Python deps: only stdlib (json, subprocess) or already-available tools (yq, jq) - [ ] No dead code - [ ] Tested against 3+ representative modules (core, user-app, custom-prefix) ## Do NOT read - Full repo — only current smoke.sh + module manifests needed for testing ## Agent notes - Recommended executor: Gemini 3.1 Pro (careful rewrite needed) - Size: Medium (~150 LOC) - Review tier: tier/medium (touches production smoke testing) - Audit ref: state/audit/deepseek-2026-06-08-multiperspective.md §T1
Collaborator

Iskra judgment

Field Value
Target pdurlej/platform#issue#764
Priority p2
Action codex_candidate
Scores reach 4 / impact 4 / confidence 5
Piotr fit high
Effort small
Labels judge/p2, judge/codex-candidate
Judge iskra via openclaw

Rationale: This is a strong P2 Codex candidate because it converts known canary findings into a scoped smoke-test rewrite that protects runtime drift detection and deployment confidence.

Caveat: Preserve smoke-test portability and verify against representative module manifests rather than reintroducing environment-specific assumptions.

Structured openclaw.judge.v0 payload
<!-- openclaw.judge.v0 -->
{
  "confidence": 5,
  "effort_hint": "small",
  "escalation": {
    "kind": "none",
    "reason": ""
  },
  "evidence_refs": [
    {
      "note": "Issue scopes a ready bugfix rewrite of tests/smoke.sh based on four canary-identified defects from PR review.",
      "type": "forgejo",
      "value": "issue-title-body-labels-and-target-snapshot"
    },
    {
      "note": "Body names concrete fixes for registry digest comparison, non-uniform container names, fragile Python dependencies, and unused dead code.",
      "type": "forgejo",
      "value": "issue-body-known-bugs-and-scope"
    },
    {
      "note": "Labels mark this as a small ready runtime bug with process and runtime risk.",
      "type": "snapshot",
      "value": "target-labels-and-target-snapshot"
    }
  ],
  "impact": 4,
  "judge_actor": {
    "name": "iskra",
    "runtime": "openclaw"
  },
  "judged_at": "2026-06-19T00:00:00Z",
  "labels_to_apply": [
    "judge/p2",
    "judge/codex-candidate"
  ],
  "piotr_fit": "high",
  "priority": "p2",
  "rationale_summary": "This is a strong P2 Codex candidate because it converts known canary findings into a scoped smoke-test rewrite that protects runtime drift detection and deployment confidence.",
  "reach": 4,
  "recommended_next_action": "codex_candidate",
  "rerun_reason": "no_prior_judgment",
  "schema": "openclaw.judge.v0",
  "target": {
    "kind": "issue",
    "number": 764,
    "repo": "pdurlej/platform"
  },
  "target_snapshot": {
    "body_hash": "sha256:2b351cebe8081b3f72a708552ef07c4847e107f81dedc9790c89c1e965678f71",
    "commit_count": null,
    "evidence_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "head_sha": null,
    "labels": [
      "domain:runtime",
      "flow/ready",
      "kind/bug",
      "phase/03",
      "priority:p2",
      "risk/process",
      "risk/runtime",
      "size/small"
    ],
    "labels_hash": "sha256:977d06cdf2ca8aadcea6572e50e27c1fa3d437b2b2fe0dbbb64749b343973fbe",
    "state": "open",
    "title_hash": "sha256:2b71b7f9733d54ee8f5ad48a6f3cceed2cc1df65a41bbf53c83b00e78c6f04b6",
    "updated_at": "2026-06-18T00:06:36+02:00"
  },
  "top_caveat": "Preserve smoke-test portability and verify against representative module manifests rather than reintroducing environment-specific assumptions."
}
<!-- /openclaw.judge.v0 -->
### Iskra judgment | Field | Value | | --- | --- | | Target | `pdurlej/platform#issue#764` | | Priority | p2 | | Action | codex_candidate | | Scores | reach 4 / impact 4 / confidence 5 | | Piotr fit | high | | Effort | small | | Labels | `judge/p2`, `judge/codex-candidate` | | Judge | `iskra` via `openclaw` | **Rationale:** This is a strong P2 Codex candidate because it converts known canary findings into a scoped smoke-test rewrite that protects runtime drift detection and deployment confidence. **Caveat:** Preserve smoke-test portability and verify against representative module manifests rather than reintroducing environment-specific assumptions. <details> <summary>Structured openclaw.judge.v0 payload</summary> ```json <!-- openclaw.judge.v0 --> { "confidence": 5, "effort_hint": "small", "escalation": { "kind": "none", "reason": "" }, "evidence_refs": [ { "note": "Issue scopes a ready bugfix rewrite of tests/smoke.sh based on four canary-identified defects from PR review.", "type": "forgejo", "value": "issue-title-body-labels-and-target-snapshot" }, { "note": "Body names concrete fixes for registry digest comparison, non-uniform container names, fragile Python dependencies, and unused dead code.", "type": "forgejo", "value": "issue-body-known-bugs-and-scope" }, { "note": "Labels mark this as a small ready runtime bug with process and runtime risk.", "type": "snapshot", "value": "target-labels-and-target-snapshot" } ], "impact": 4, "judge_actor": { "name": "iskra", "runtime": "openclaw" }, "judged_at": "2026-06-19T00:00:00Z", "labels_to_apply": [ "judge/p2", "judge/codex-candidate" ], "piotr_fit": "high", "priority": "p2", "rationale_summary": "This is a strong P2 Codex candidate because it converts known canary findings into a scoped smoke-test rewrite that protects runtime drift detection and deployment confidence.", "reach": 4, "recommended_next_action": "codex_candidate", "rerun_reason": "no_prior_judgment", "schema": "openclaw.judge.v0", "target": { "kind": "issue", "number": 764, "repo": "pdurlej/platform" }, "target_snapshot": { "body_hash": "sha256:2b351cebe8081b3f72a708552ef07c4847e107f81dedc9790c89c1e965678f71", "commit_count": null, "evidence_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "head_sha": null, "labels": [ "domain:runtime", "flow/ready", "kind/bug", "phase/03", "priority:p2", "risk/process", "risk/runtime", "size/small" ], "labels_hash": "sha256:977d06cdf2ca8aadcea6572e50e27c1fa3d437b2b2fe0dbbb64749b343973fbe", "state": "open", "title_hash": "sha256:2b71b7f9733d54ee8f5ad48a6f3cceed2cc1df65a41bbf53c83b00e78c6f04b6", "updated_at": "2026-06-18T00:06:36+02:00" }, "top_caveat": "Preserve smoke-test portability and verify against representative module manifests rather than reintroducing environment-specific assumptions." } <!-- /openclaw.judge.v0 --> ``` </details>
Sign in to join this conversation.
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform#764
No description provided.