stacklok / stacklok/mecatl

test(learning): diagnose intermittent learned-skill publication failure

Open
#1,088 0 comments 0 reactions 1 assignee View on GitHub

@JAORMX is already working on this.

Since Sep 7, 2026.

Dominant language
Go
Stars
152
Forks
16
Avg merge
14h 48m
Merged PRs (30d)
536

Description

Problem

TestUsableAutoSkillsStockBuildPolicyMatrix/untrusted_project_ignored intermittently fails with only:

server: internal error: learned skill operation failed

The immediate retry passed without code changes, so this is currently an observability/reliability investigation rather than evidence of a deterministic policy regression.

Why diagnosis is insufficient

The test polls learned skills while asynchronous recovery/publication is active. ListLearnedSkills publishes before listing, but skillServiceError intentionally collapses publication and repository errors to the generic RPC error, leaving CI with no actionable underlying cause.

Relevant code:

  • internal/app/usable_auto_skills_matrix_e2e_test.go:128-145
  • internal/app/attempt_recovery.go:24-67
  • internal/adapter/server/learnedskills.go:70-88,323-333
  • internal/adapter/skillstore/store.go:199-245,431-527

A plausible transient source is the five-second flock-bounded skill-store path during publication/recovery, but the existing failure message cannot establish that.

Acceptance criteria

  • On this matrix test's failure path, retain safe diagnostic context for the underlying publication/repository error.
  • Do not expose skill content, credentials, or sensitive filesystem data.
  • Keep the production RPC client error fail-closed and appropriately generic.
  • Use the evidence to either eliminate a confirmed synchronization flaw or document and stabilize the intended transient behavior.

Observed in PR #957, workflow run 33855617933; it passed on immediate retry.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.