Traffic guide rendered empty since 2026-10-28: a // comment inside the network filter one-liner swallowed the return and the closing brackets, so traffic-guide.js failed to parse (Marty saw it on his phone 2026-10-29). Comment moved out, ?v=20261029b. QA: node --check syntax gate on every script in every run.sh mode; /traffic-guide, /refuel and /conversion-tracking added to the public walk
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
const rows = Object.keys(o.fit).sort((a, b) => ORDER.indexOf(o.fit[a][0]) - ORDER.indexOf(o.fit[b][0]));
|
||||
const good = rows.filter(f => o.fit[f][0] === 'best' || o.fit[f][0] === 'good');
|
||||
// networks that sell at least one best/good format; strict-policy networks are left out for the opportunity offer
|
||||
const nets = Object.keys(G.NETWORKS).filter(k => { const n = G.NETWORKS[k]; if (n.strict && o.key === 'opp') return false; if (n.adult === 'adult' && !['games', 'sweeps'].includes(o.key)) return false; // adult-only sites suit few offers return n.f.some(f => good.includes(f)); })
|
||||
// adult-only sites suit few offers
|
||||
const nets = Object.keys(G.NETWORKS).filter(k => { const n = G.NETWORKS[k]; if (n.strict && o.key === 'opp') return false; if (n.adult === 'adult' && !['games', 'sweeps'].includes(o.key)) return false; return n.f.some(f => good.includes(f)); })
|
||||
.map(k => ({ k, score: G.NETWORKS[k].f.reduce((s, f) => s + (o.fit[f] ? (o.fit[f][0] === 'best' ? 3 : o.fit[f][0] === 'good' ? 1 : 0) : 0), 0) }))
|
||||
.sort((a, b) => b.score - a.score || nameOf(a.k).localeCompare(nameOf(b.k)));
|
||||
$('result').innerHTML = '<div class="res"><div class="fit">'
|
||||
|
||||
@@ -65,6 +65,6 @@
|
||||
</div>
|
||||
<script src="/assets/cr-shell.js?v=20261025ff"></script>
|
||||
<script src="/assets/traffic-guide-data.js?v=20261028a"></script>
|
||||
<script src="/assets/traffic-guide.js?v=20261028a"></script>
|
||||
<script src="/assets/traffic-guide.js?v=20261029b"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -36,6 +36,19 @@ stop_local() { # $1 = port
|
||||
rm -rf "$TMP-$1"
|
||||
}
|
||||
|
||||
# Syntax gate, every mode (2026-10-29): /traffic-guide shipped with a parse error in traffic-guide.js (a // comment inside a
|
||||
# one-liner) and rendered empty for everyone for a day. node --check costs nothing and catches it before any walk runs.
|
||||
syntax_gate() {
|
||||
local bad=0 f
|
||||
for f in *.js lib/*.js public/*.js public/assets/*.js; do
|
||||
[ -f "$f" ] || continue
|
||||
node --check "$f" 2>"$OUT/syntax.err" || { echo "[bug] SYNTAX $f :: $(grep -m1 -E 'Error' "$OUT/syntax.err")"; bad=1; }
|
||||
done
|
||||
rm -f "$OUT/syntax.err"
|
||||
[ "$bad" = 0 ] && echo "syntax gate: every script parses" || status=1
|
||||
}
|
||||
syntax_gate
|
||||
|
||||
if [ "$MODE" = "public" ]; then
|
||||
node qa/walk.mjs public || status=1
|
||||
elif [ "$MODE" = "fuel" ]; then
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ if (MODE === 'public' || MODE === 'all') {
|
||||
const page = await ctx.newPage(); const bag = watch(page, LIVE);
|
||||
const PUBLIC = ['/', '/ledger', '/contract', '/terms', '/privacy', '/disclaimer', '/wall/martbost', '/join/martbost',
|
||||
'/join/martbost?v=instant', '/join/martbost?v=adspend', '/join/martbost?v=free', '/join/martbost?v=ledger', '/join/martbost?v=two',
|
||||
'/admin', '/my', '/shorts', '/nope-404'];
|
||||
'/traffic-guide', '/refuel', '/conversion-tracking', '/admin', '/my', '/shorts', '/nope-404'];
|
||||
for (const p of PUBLIC) {
|
||||
const label = 'LIVE ' + p;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user