Skip to content

Always overwrite on Generate/Summarize/Describe; fix collateral provenance lock - #25

Merged
davior merged 2 commits into
mainfrom
claude/trusting-shannon-uuvqvf
Sep 18, 2026
Merged

davior merged 2 commits into
mainfrom
claude/trusting-shannon-uuvqvf

Conversation

@davior

@davior davior commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to a conversation about why "Summarize with AI" / "Describe with AI" sometimes silently did nothing. Confirmed with the user (via clarifying questions) what the intended behavior should be, then implemented it:

  • apply_ai_metadata now always overwrites. Pressing Generate/Summarize/Describe/"Generate all" (or running a bulk action) is an explicit, deliberate request for a fresh answer, so it now lands unconditionally — including over a description/summary a person typed by hand. field_provenance is still stamped "ai"/"human" for bookkeeping; it's just no longer read as a gate.
  • Fixed the actual reason fields were getting silently locked in the first place. AssetDetail's single "Save changes" button sent name, description, and summary together in one PATCH whenever any of the three changed — so editing just the name also re-stamped description/summary as human-written, even while they were still blank. It now sends only the fields that actually changed.
  • summarize/describe now also feed the asset's own tags into the prompt as additional context, alongside the filename and existing transcript/document/poster/image material.
  • Updated docs/m6-ai-enrichment.md and docs/plan-of-attack.md (both describe FR 8.1.3's provenance mechanism) to reflect the new behavior rather than leave them describing a rule that no longer holds.

Test plan

  • cd backend && pytest -q — 754 passed, 24 skipped; the only 6 failures are pre-existing on a clean checkout (missing ffmpeg/ffprobe in this sandbox, unrelated to this change).
  • cd frontend && npm test -- --run — 256 passed.
  • cd frontend && npm run build — typechecks and builds cleanly.
  • Added/updated backend tests: a field marked "human" is now overwritten rather than skipped (test_summarize.py, test_describe.py), apply_ai_metadata overwrites a human-marked field directly, and the asset's tags show up in the sent prompt for both jobs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FdoHBNLsz2cXKBVzsqKPoV


Generated by Claude Code

…nance lock

Pressing Generate/Summarize/Describe is an explicit request for a fresh
answer, so apply_ai_metadata no longer skips a field marked "human" in
field_provenance -- it always overwrites, on the single-asset buttons,
"Generate all", and bulk actions alike (they all route through the same
summarize.run/describe.run). field_provenance is still stamped for
bookkeeping, just no longer read as a gate.

Also fixes the actual reason fields were getting silently locked in the
first place: AssetDetail's save button sent name/description/summary as a
fixed trio whenever any one changed, so editing just the name also
re-stamped the other two as human-written -- even while empty. It now
sends only the fields that actually changed.

summarize and describe also now feed the asset's own tags into the prompt
as additional context, alongside the filename and existing material.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FdoHBNLsz2cXKBVzsqKPoV
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FdoHBNLsz2cXKBVzsqKPoV
@davior
davior marked this pull request as ready for review September 18, 2026 01:15
@davior
davior merged commit 2b6b92f into main Sep 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants