tickets
All repositories: gitoria
1.5 KB
#!/usr/bin/env python3# tests/realdata-compare.py (mission 010): compare two tests/realdata-baseline.mjs outputs (the reads; writes:# realdata-compare-writes.py). Masks only what is not the app's output:# "at":<ms> the session seed's request time (differs between two runs of the SAME code)# "site":"<file:l:c>" source coordinates of a View node (move when lines above it move)# ?v=<hash> hl:web's content hash of the runtime / stylesheet / component modules# Child@<line>:<col> a child component's mount key carries its source position too# python3 tests/realdata-compare.py <dirA> <dirB> → per-file verdict; exit 1 on a real differenceimport os, re, sysa, b = sys.argv[1], sys.argv[2]masks = [(re.compile(r'\\"at\\":\d+'), r'\"at\":T'), (re.compile(r'\\"site\\":\\"[^"\\]*\\"'), r'\"site\":S'), (re.compile(r'\?v=[0-9a-f]+'), '?v=H'), (re.compile(r'([A-Z]\w*)@\d+:\d+'), r'\1@L:C')]def norm(t):for r, s in masks: t = r.sub(s, t)return tfa, fb = sorted(f for f in os.listdir(a) if '-w-' not in f), sorted(f for f in os.listdir(b) if '-w-' not in f) # writes: realdata-compare-writes.pyif fa != fb: print('FILE LISTS DIFFER', set(fa) ^ set(fb)); sys.exit(1)raw = masked = 0; bad = []for f in fa:x, y = open(os.path.join(a, f)).read(), open(os.path.join(b, f)).read()if x == y: continueraw += 1if norm(x) != norm(y): bad.append(f)print(f'{len(fa)} files: {len(fa) - raw} byte-identical, {raw - len(bad)} identical after masking, {len(bad)} DIFFERENT')for f in bad[:30]: print(' DIFF', f)sys.exit(1 if bad else 0)
Branches
Latest commits
- 54bc5fe1Harden delta relevance, overflow caps and retry verificationmre
- 8d8e2053Document subscription contract and exercise delta deliverymre
- fd23726aAdd subscription delta API and signed wake bridgemre
- c5d28fb5Tickets conductor: S51 startedmre
- fd6ca1e6Tickets conductor: brief 027 waker design, push-test projectmre
- e448e656Tickets conductor: STATUS #51mre
- 1c10857bTickets conductor: P51 eval, brief 027mre
- e725969dTickets conductor: #51 directionmre
- 1b5c63ddTickets conductor: P51 startedmre
- 9f13fbdaTickets conductor: brief 026 prioritymre
- acc477d9Tickets conductor: brief 026 + Vinzenz recommendationsmre
- 9233a734Tickets conductor: brief 026 completemre
- 5da589fdTickets conductor: brief 026 + Gitoria's answermre
- a3cd5329Tickets conductor: tickets#51 opened, brief 026 draftmre
- 6f6e5797Tickets conductor: STATUS wordingmre
- 957de51fTickets conductor: T36 live, #36 review, #50 donemre
- bc2fde32Merge branch 'main' into t36-stylemre
- b7ca093atests: wait for the new row and normalize editor marker spacesmre
- 41da3525Tickets conductor: flake cause, T36 deploy stepmre
- 64c477e6Tickets conductor: deploy waits for Arachnemre