feat: implement Research Project PageView (v1.8) with static SSG pre-render and E2E gates
This commit is contained in:
@@ -14,17 +14,18 @@ MONTH_MAP = {
|
||||
}
|
||||
|
||||
def verify():
|
||||
from generate_all import parse_members, parse_publications, parse_lectures, parse_standards
|
||||
from generate_all import parse_members, parse_publications, parse_lectures, parse_standards, parse_projects
|
||||
|
||||
active_m, alumni_m = parse_members()
|
||||
intl_p, dom_p, pat_p = parse_publications()
|
||||
semesters = parse_lectures()
|
||||
bodies = parse_standards()
|
||||
projects = parse_projects()
|
||||
|
||||
total_pubs = len(intl_p) + len(dom_p) + len(pat_p)
|
||||
std_docs_count = sum(len(p["documents"]) for b in bodies for p in b["projects"])
|
||||
|
||||
print("=== DATA VERIFICATION GATE (AC-07 / AC-08 / AC-10 / AC-11 / VOLUME CROSS-CHECK) ===")
|
||||
print("=== DATA VERIFICATION GATE (AC-07 / AC-08 / AC-10 / AC-11 / AC-30 / VOLUME CROSS-CHECK) ===")
|
||||
print(f"Active Members: {len(active_m)} (Expected: 16)")
|
||||
print(f"Alumni: {len(alumni_m)} (Expected: 60)")
|
||||
print(f"International Papers: {len(intl_p)} (Expected: 68)")
|
||||
@@ -34,9 +35,20 @@ def verify():
|
||||
print(f"Lectures Semesters: {len(semesters)} (Expected: 45)")
|
||||
print(f"Standard Bodies: {len(bodies)} (Expected: 6)")
|
||||
print(f"Standard Documents: {std_docs_count} (Expected: 44)")
|
||||
print(f"Research Projects: {len(projects)} (Expected: 3)")
|
||||
|
||||
errors = []
|
||||
|
||||
if len(projects) != 3:
|
||||
errors.append(f"Research Projects count mismatch: got {len(projects)}, expected 3")
|
||||
|
||||
# AC-30: Keyword Substring Verification (Ensures zero hallucinated/created keywords)
|
||||
for proj in projects:
|
||||
abstract = proj.get("abstract", "")
|
||||
for kw in proj.get("keywords", []):
|
||||
if kw not in abstract:
|
||||
errors.append(f"AC-30 Keyword Violation in project '{proj.get('slug')}': keyword '{kw}' not in abstract")
|
||||
|
||||
# 1. Count checks
|
||||
if len(active_m) != 16:
|
||||
errors.append(f"Active Members count mismatch: got {len(active_m)}, expected 16")
|
||||
|
||||
Reference in New Issue
Block a user