mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #546] [MERGED] build: pin LF via .gitattributes and verify manifest bytes for every package #1020
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1020
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/546
Author: @kolacheee
Created: 8/24/2026
Status: ✅ Merged
Merged: 8/24/2026
Merged by: @kolacheee
Base:
staging← Head:fix/545-lf-pinning📝 Commits (3)
d09babebuild: pin text files to LF so clones stop corrupting artifacts9765ca1fix(scripts): check manifest bytes for catalog-excluded packages too3c366f0fix(scripts): reject symlinked package directories in the integrity sweep📊 Changes
3 files changed (+243 additions, -44 deletions)
View changed files
➕
.gitattributes(+54 -0)➕
scripts/package-manifest-integrity.mjs(+170 -0)📝
scripts/validate-catalog.mjs(+19 -44)📄 Description
Pull request
Linked issue
Closes #545
Why this change
core.autocrlf=trueinto the system gitconfig, so a fresh clone on Windows is CRLF-smudged before any repo-local setting can help. This repo's builds raw-concatenatesrc/*.jsand its manifests record exact bytes/sha256, so the smudge has already caused a shipped defect: pixelforge 0.11.0's manifest, artifact zip, and source blob disagreed by 3,280 bytes because one source file sat CRLF at build time (caught in #544 review). The same smudge makesvalidate-catalog.mjsandvalidate-package-locales.mjsfail on packages a contributor never touched. And the byte-equality check that enforces exactly this invariant only walkedcatalog.packages— soINCOMPLETE_PACKAGE_IDSmembers (pixelforge) were never checked at all, which is how the broken commit shipped.What changed
.gitattributes(new):* text=auto eol=lfas the base —eoltravels with the tree and wins over anycore.autocrlf— plus explicitbinarypins for the 272 committed.zipartifacts,.png(the only image format in the tree today), the other image formatsvalidate-catalog.mjsalready accepts (pinned before one lands), and defensive audio/font/pdf rules. Noeol=crlfrules: the repo contains no Windows-native scripts (documented in a comment). No renormalization was needed: all 1,282 text blobs at HEAD are already pure LF and all 323 binaries are-text, triple-verified (git ls-files --eol, a per-blobcat-filescan, andgit add --renormalize .staging zero changes) — so this PR changes checkout behavior only, not one byte of content.scripts/package-manifest-integrity.mjs(new) +validate-catalog.mjsrewired: the per-file bytes/sha256 assertions andreadZipmove into a shared module used by both the existing catalog loop and a new sweep over everypackages/*/manifest.jsonthe catalog misses — identical code on both paths, so they cannot drift. Catalog-excluded packages now get the same source-vs-manifest and artifact-vs-manifest verification as everything else. CI already runsvalidate-catalog.mjs, so no workflow change is needed.Package and security impact
Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
Boxes left for the human contributor per the template. What was agent-verified, exactly:
git clone --local -c core.autocrlf=trueof the branch parent checks out 1,282 files as CRLF and failsvalidate-package-locales(stale-size error onbackground) andvalidate-catalog(byte mismatch oneightball) on the raw tree; the identical clone of this branch checks out everything LF (w/lf1,284 /w/-text323, zero CRLF), all validators exit 0, and all 323 binaries are byte-identical to their blobs (pixelforge-0.11.0.zipdisk = blob).npm run check(pinned prettier 3.9.6 + eslint 10.8.1) 0 errors;validate-catalog/validate-package-locales/test-catalog-lanes/validate-pr-triageall exit 0;git diff --checkclean.npm run test:securityfails on Windows only (catalog-path-safety.regression.mjsasserts a POSIX-shaped path); identical on the unmodified parent; CI runs ubuntu.Documentation impact
.gitattributescarries its own rationale as comments where the next contributor will meet itUI evidence (if applicable)
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.