fix(scan): uploads carry their sha256, so change detection compares the bytes #531

Merged
sharang merged 2 commits from fix/a6-upload-change into main 2026-10-08 21:45:33 +00:00
2 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 c85e775385 fix(scan): a git target with a new upload is scanned, uploads beside git listed
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 10m34s
Stage: a ZIP uploaded to a git-created target was followed by a scheduled
run that skipped with "no new commits" (the git path), so the new upload
seemed ignored. It was: the code scan reads the repository only.

- A git target with a file uploaded since its last completed scan is not
  skipped for "no new commits"; with no uploads nothing changes.
- An archive uploaded to a git target is listed under "Nicht ausgeführt"
  as not scanned (upload it as a target of its own), in DE and EN.
- UPLOAD_CHANGE_SKIP=false turns the skipping of unchanged uploads off
  (on by default).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-10-08 23:33:14 +02:00
Sharang ParnerkarandClaude Opus 5.5 1602acd233 fix(scan): uploads carry their sha256, so change detection compares the bytes
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Check (pull_request) Failing after 6m55s
#465's change key for uploaded files is a digest of each upload's
artifact id and content_hash, but nothing ever stored content_hash on an
uploaded artifact (ingest hashed the blob and dropped it). So the key
never described the files actually uploaded.

- the upload handler stores the sha256 of the uploaded bytes on the
  artifact
- a scan stores the sha256 ingest computed on older uploads that have
  none, so existing targets become comparable (a scheduled run skips from the third scan on)
- a person's scan request takes over a pending scheduled/webhook
  follow-up in the scan gate instead of being dropped, so "Prüfung
  starten" right after an upload always scans in full

Unchanged scheduled rescans still skip (identical uploads, same build).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-10-08 23:22:05 +02:00