Always overwrite on Generate/Summarize/Describe; fix collateral provenance lock - #25
Merged
Merged
Conversation
…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
marked this pull request as ready for review
September 18, 2026 01:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_metadatanow 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 adescription/summarya person typed by hand.field_provenanceis still stamped"ai"/"human"for bookkeeping; it's just no longer read as a gate.AssetDetail's single "Save changes" button sentname,description, andsummarytogether 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/describenow also feed the asset's own tags into the prompt as additional context, alongside the filename and existing transcript/document/poster/image material.docs/m6-ai-enrichment.mdanddocs/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 (missingffmpeg/ffprobein this sandbox, unrelated to this change).cd frontend && npm test -- --run— 256 passed.cd frontend && npm run build— typechecks and builds cleanly."human"is now overwritten rather than skipped (test_summarize.py,test_describe.py),apply_ai_metadataoverwrites 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