feat: enhance provenance with infrastructure, actor ID, and commit tracking

- Add infrastructure field to RunStatus model
- Store infrastructure (software/hardware) from task result
- Format username as ActivityPub actor ID (@user@domain)
- Display owner, effects commit, and infrastructure in UI provenance section
- Add artdag commit tracking for identity effect
- Include infrastructure in raw JSON provenance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-07 17:24:46 +00:00
parent c7074a9261
commit 618e3b1e04
2 changed files with 57 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ from celery_app import app
# Add effects to path (use env var in Docker, fallback to home dir locally)
EFFECTS_PATH = Path(os.environ.get("EFFECTS_PATH", str(Path.home() / "artdag-effects")))
ARTDAG_PATH = Path(os.environ.get("ARTDAG_PATH", str(Path.home() / "art" / "artdag")))
def get_effects_commit() -> str:
@@ -35,6 +36,22 @@ def get_effects_commit() -> str:
return "unknown"
def get_artdag_commit() -> str:
"""Get current git commit hash of artdag repo."""
try:
result = subprocess.run(
["git", "rev-parse", "HEAD"],
cwd=ARTDAG_PATH,
capture_output=True,
text=True
)
if result.returncode == 0:
return result.stdout.strip()
except Exception:
pass
return "unknown"
sys.path.insert(0, str(EFFECTS_PATH / "dog"))
@@ -128,11 +145,13 @@ def render_effect(self, input_hash: str, effect_name: str, output_name: str) ->
# Build effect info based on source
if effect_name == "identity":
# Identity is from artdag package on GitHub
artdag_commit = get_artdag_commit()
effect_info = {
"name": f"effect:{effect_name}",
"content_hash": REGISTRY[f"effect:{effect_name}"]["hash"],
"repo": "github",
"repo_url": "https://github.com/gilesbradshaw/art-dag/blob/main/artdag/nodes/effect.py"
"repo_commit": artdag_commit,
"repo_url": f"https://github.com/gilesbradshaw/art-dag/blob/{artdag_commit}/artdag/nodes/effect.py"
}
else:
# Other effects from rose-ash effects repo