Skip to content

spec: issue-3556 Pointers to spec sources in the AI coding session transcript - #3557

Merged
migmartri merged 7 commits into
mainfrom
issue-3556-spec-session-image-placeholders
Oct 8, 2026
Merged

migmartri merged 7 commits into
mainfrom
issue-3556-spec-session-image-placeholders

Conversation

@migmartri

@migmartri migmartri commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Summary

The AI coding session material already lists its sources (tickets, documents, plans, images, skills) in a spec list, each pointing to a sibling material in the same attestation. The transcript also holds copies of many of these sources, so the evidence stores the same content up to three times. Inline base64 images make the session too large to show, and the secret redaction scans (and sometimes corrupts) them.

This spec makes the CLI, at push time, replace each exact copy of a spec-list source in the transcript with a small pointer to its material:

{ "type": "chainloop.replaced", "digest": "sha256:..." }
  • Copies are found in file reads (digest of the file at the read path, so resized images still match) and in file writes (digest of the written content, so ticket and plan files match).
  • Only exact digest matches are replaced. Everything else stays inline, the push never fails because of it, and debug output reports matched and unmatched copies per finder.
  • The secret redaction skips base64 media that stays inline.
  • The pointer is extensible to other content kinds later. Pasted images are left to a later spec.

We would like two reviewers to approve this spec before it merges.

Refs #3556

AI disclosure: this spec was drafted with the help of Claude Code.

🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri

Refs #3556

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 383701ed-3811-43b8-a02a-299e49a9a604
@migmartri migmartri added the spec Design spec label Oct 7, 2026
@migmartri
migmartri requested review from a team and jiparis October 7, 2026 22:36
@chainloop-platform

chainloop-platform Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — 🟡 81% · ⚠️ 1 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟡 81% 1 ⚠️ 1 100% AI / 0% Human 1 +451 / -237 57m18s

🟡 81% — 100% AI — ⚠️ 1 policies failing

Oct 7, 2026 22:29 UTC · 57m18s · $25.79 · 672 in / 422.7k out · claude-code 2.1.293 (claude-opus-5-5)

View session details ↗

Change Summary

  • Drafts and iteratively revises a spec-only PR for replacing transcript copies of data.spec sources with chainloop.replaced pointers.
  • Narrows scope from broader attachment handling to exact-copy replacement of already-captured sources, deferring pasted-image expansion.
  • Updates the PR title, body, and review discussion around placeholder shape, material linkage, and open questions.

AI Session Overall Score

🟡 81% — Focused spec work, but planning and explanation loops kept reviewer attention warranted.

AI Session Analysis Breakdown

🟢 92% · scope-discipline

🟢 The work stayed on one spec, its PR text, and linked tickets. · High Impact

🟢 88% · alignment

🟢 AI restated the goals and then matched later scope changes. · High Impact

🟡 70% · context-and-planning

🟠 No shared plan or TODO preceded a long multi-revision spec-editing cycle. · Medium Severity

💡 For long spec revisions, write a short shared plan before opening the PR so scope changes have a stable baseline.

🟡 66% · user-trust-signal

🟢 The user kept the session collaborative while refining the design. · High Impact

🟠 The user had to re-ask the replacement rule and scope several times before the final simplification. · Medium Severity

💡 When explanations start looping, pause and ask for a one-rule restatement before continuing.

abstained · solution-quality

No notes.

abstained · verification

🟡 Verification and solution-quality are effectively N/A here because the PR only revises a design spec. · Low Severity

Missing criteria: solution-quality, verification


File Attribution

████████████████████ 100% AI / 0% Human

Status Attribution File Lines
modified ai docs/specs/issue-3556-session-image-placeholders.md +451 / -237

Policies (4, 1 failing)

Status Policy Material Messages
✅ Passed ai-config-ai-agents-allowed ai-coding-session-383701 -
✅ Passed ai-config-no-dangerous-commands ai-coding-session-383701 -
⚠️ Failed ai-config-no-secrets ai-coding-session-383701
  • Secret (brave-search-api-key) detected in session content [turn=259, source=tool_result, line=1]: {"id":"PFM-7645","uuid":"1f67d917-8226-4874-a0b9-f790ad691b95","title":"AI coding session evidence is too large to show because base64 images are stored inline, some of them twice","description":"## W...
  • Secret (brave-search-api-key) detected in session content [turn=45, source=tool_result, line=1]: {"id":"PFM-7645","uuid":"1f67d917-8226-4874-a0b9-f790ad691b95","title":"AI coding session evidence is too large to show because base64 images are stored inline, some of them twice","description":"## W...
  • Secret (brave-search-api-key) detected in session content [turn=48, source=assistant-tool_use:Write, line=1]: {"content":"---\nkind: ticket\nuri: https://linear.app/chainloop/issue/PFM-7645\\nrole: task\ntitle: \"PFM-7645: AI coding session evidence is too large to show because base64 images are stored inline,...
  • Secret (generic-[REDACTED:generic-password) detected in session content [turn=510, source=tool_result, line=118]: | ⚠️ Failed | ai-config-no-secrets | [ai-coding-session-383701](https://app.chainloop.dev/u/chainloop/projects/chainloop/versi...
  • Secret (generic-password) detected in session content [turn=225, source=tool_result, line=14]: INF redacted secrets from the AI coding session before upload count=10 rules=["generic-[REDACTED:generic-password]"]
  • Secret (generic-password) detected in session content [turn=510, source=tool_result, line=118]: | ⚠️ Failed | ai-config-no-secrets | [ai-coding-session-383701](https://app.chainloop.dev/u/chainloop/projects/chainloop/versi...
✅ Passed ai-config-mcp-servers-allowed ai-coding-session-383701 -

Security Checks — ✅ 5 passing

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

Status Policy Messages
✅ Passed owasp-top10-2025 -
✅ Passed sast -
✅ Passed cwe-top25 -
✅ Passed cwe-top26-40-cusp -
Scans not applied (3)
Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed
iac-scan no IaC files changed

View attestation ↗

Security context

✅ Nothing this change touches has a recorded security-fix history.

View in Chainloop ↗ · How this works ↗


Powered by Chainloop and Chainloop Trace

Generalize from images to any attachment: never keep inline content that is also an attachment. Start from the attachments, replace their copies in the transcript, then redact. Remove only confirmed attachments, and make the placeholder extensible to other content kinds.

Refs #3556

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 383701ed-3811-43b8-a02a-299e49a9a604
@migmartri migmartri changed the title spec: issue-3556 Image placeholders in the AI coding session transcript spec: issue-3556 Attachment placeholders in the AI coding session transcript Oct 7, 2026
jiparis
jiparis previously approved these changes Oct 7, 2026
Comment thread docs/specs/issue-3556-session-image-placeholders.md Outdated
…ages, minimal pointer

Replace only transcript copies of sources in the session spec list. Capture pasted images as spec sources. The placeholder is a chainloop.replaced pointer with the sibling material digest. Address review on the role of new materials.

Refs #3556

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 383701ed-3811-43b8-a02a-299e49a9a604
Refs #3556

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 383701ed-3811-43b8-a02a-299e49a9a604
@migmartri migmartri changed the title spec: issue-3556 Attachment placeholders in the AI coding session transcript spec: issue-3556 Pointers to spec sources in the AI coding session transcript Oct 7, 2026
jiparis
jiparis previously approved these changes Oct 7, 2026
…rt with match report

Cover text sources such as tickets through a file write finder. Move pasted images to a later spec. Make the replacement best effort with a debug match report.

Refs #3556

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 383701ed-3811-43b8-a02a-299e49a9a604
Refs #3556

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 383701ed-3811-43b8-a02a-299e49a9a604
Refs #3556

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 383701ed-3811-43b8-a02a-299e49a9a604
@migmartri
migmartri merged commit 4e785dd into main Oct 8, 2026
16 of 17 checks passed
@migmartri
migmartri deleted the issue-3556-spec-session-image-placeholders branch October 8, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spec Design spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants