Skip to content

feat: add required artifact checker helper - #23414

Closed
ai-ag2026 wants to merge 1 commit into
NousResearch:mainfrom
ai-ag2026:required-artifacts-helper
Closed

ai-ag2026 wants to merge 1 commit into
NousResearch:mainfrom
ai-ag2026:required-artifacts-helper

Conversation

@ai-ag2026

Copy link
Copy Markdown
Contributor

Summary

Adds a small reusable helper for checking declared required artifact paths.

Why

Agent workflows often need to verify that a worker produced concrete files rather than trusting a textual summary. This helper makes that pattern reusable without introducing a task-runtime framework. It provides the file-existence layer for the independent verification / quality-gate primitive discussed in #406.

Design

  • Accepts string paths or {path: ...} declarations.
  • Resolves paths through an explicit path policy.
  • Verifies file existence only by default; content validation is intentionally the consumer's responsibility because content schemas are workflow-specific.
  • Treats directories as not satisfying artifact declarations by default (require_file=True), with an explicit opt-out for directory artifacts.
  • Returns structured JSON-serializable results.
  • Does not print, mutate, or depend on any local task system.
  • Lives as artifact_checks.py rather than utils/artifact_checks.py because upstream already has top-level utils.py; the dedicated module avoids import/package ambiguity while keeping the helper out of the general-purpose utils.py catch-all.

Test plan

  • python -m pytest tests/test_artifact_checks.py -q -o 'addopts='
  • python -m py_compile artifact_checks.py tests/test_artifact_checks.py
  • git diff --check

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels May 10, 2026
@ai-ag2026

Copy link
Copy Markdown
Contributor Author

CI note while this is still draft:

The red checks currently appear unrelated to this PR's two-file diff (artifact_checks.py, tests/test_artifact_checks.py):

  • Windows footguns (blocking) fails on pre-existing tools/process_registry.py:588 (os.killpg(..., signal.SIGKILL)). Local diff-scoped check is clean: python scripts/check-windows-footguns.py --diff origin/main -> no footguns across 2 changed files.
  • e2e fails in tests/e2e/test_platform_commands.py on /new session reset assertions. I reproduced the same e2e failure set on a detached origin/main worktree, so this is baseline breakage rather than introduced by this artifact-check helper.

Focused checks for this PR remain green:

  • python -m pytest tests/test_artifact_checks.py -q -o 'addopts=' -> 18 passed
  • python -m py_compile artifact_checks.py tests/test_artifact_checks.py
  • git diff --check

@ai-ag2026
ai-ag2026 marked this pull request as ready for review May 10, 2026 21:22
@ai-ag2026

Copy link
Copy Markdown
Contributor Author

Marked ready for review.

Focused PR checks remain green locally and in CI where diff-scoped checks apply. The currently red checks were triaged above as baseline/unrelated to this two-file helper PR.

@ai-ag2026

Copy link
Copy Markdown
Contributor Author

Closing as stale/superseded by the current upstream direction.

This patch is still technically unique and applied cleanly during the latest reality check, but the original quality-gate / artifact-checker motivation has since moved upstream via the merged requesting-code-review skill consolidation (#4854, absorbing #4459 and closing #406). A standalone core required artifact checker helper no longer matches the current upstream shape unless maintainers explicitly want a reusable core API later.

@ai-ag2026 ai-ag2026 closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants