Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h1 align="center">Passli</h1>

<p align="center">
<img src=".github/assets/passli-repo-banner.png" alt="Passli — Cryptographic Document Vault & Ephemeral Sharing Platform" width="100%">
<strong>Cryptographic Document Vault & Ephemeral Sharing Platform</strong>
</p>

<p align="center">
Expand Down
22 changes: 9 additions & 13 deletions tests/unit/test_repo_visual_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,39 +80,35 @@ def test_vault_documents_asset(self):
self.assertEqual(im.size, (1376, 768))

def test_readme_references_assets(self):
"""README.md must reference only the primary unique identification banner."""
"""README.md must not embed local repository assets directly, keeping the document lightweight."""
import re

self.assertTrue(self.readme_path.exists(), "README.md must exist")
content = self.readme_path.read_text(encoding="utf-8")

# Primary unique identification hero banner must be referenced and exist
primary_banner = ".github/assets/passli-repo-banner.png"
self.assertIn(primary_banner, content, f"README.md must contain relative link to {primary_banner}")
self.assertTrue((self.base_dir / primary_banner).exists(), f"Asset {primary_banner} must exist on disk")

# Extract all image tags (HTML <img src="..."> and Markdown ![...](...))
html_imgs = re.findall(r'<img\s+[^>]*src=[\x22\x27]([^\x22\x27]+)[\x22\x27]', content)
md_imgs = re.findall(r'!\[[^\]]*\]\(([^)]+)\)', content)
all_imgs = html_imgs + md_imgs

# Local asset images embedded in README must ONLY consist of the primary banner
# Local asset images must not be embedded in README.md
local_asset_imgs = [img for img in all_imgs if ".github/assets" in img or not img.startswith("http")]
self.assertEqual(
local_asset_imgs,
[primary_banner],
f"README.md must contain only the primary banner as embedded local asset, found: {local_asset_imgs}",
[],
f"README.md must not embed local assets directly, found: {local_asset_imgs}",
)

# Secondary visual embeds must not be embedded anywhere in README.md
secondary_assets = [
# Visual assets must not be embedded anywhere in README.md
repo_assets = [
".github/assets/passli-repo-banner.png",
".github/assets/passli-ephemeral-workflow.gif",
".github/assets/passli-dashboard-preview.png",
".github/assets/passli-vault-documents.png",
".github/assets/passli-cryptographic-pipeline.png",
]
for asset in secondary_assets:
self.assertNotIn(asset, content, f"README.md should not embed secondary asset {asset}")
for asset in repo_assets:
self.assertNotIn(asset, content, f"README.md should not embed asset {asset}")

def test_architecture_doc_references_assets(self):
"""docs/ARCHITECTURE.md must reference architecture and workflow assets."""
Expand Down
Loading