Skip to content

Instantly share code, notes, and snippets.

View copyleftdev's full-sized avatar

L337[3ed2aa04]SIGMA copyleftdev

View GitHub Profile
@copyleftdev
copyleftdev / CLAUDE.md
Created April 12, 2026 02:36
Palimpsest: CLAUDE.md (Full Project Instructions)

PALIMPSEST — Deterministic Crawl Kernel

Same input + same seed = identical crawl, identical artifacts, identical replay. Everything bends around this. If we lose this, we've built noise — not history.

What This Is

A crawl kernel, not a crawler. Provides deterministic scheduling, reproducible fetch execution, verifiable artifact generation, replay-grade normalization, and temporal indexing as a first-class primitive. CLI, UI, dashboards are thin skin. The kernel is the product.

@copyleftdev
copyleftdev / lib.rs
Created April 12, 2026 02:36
Palimpsest: ExecutionEnvelope (Sealed Context)
//! palimpsest-envelope: The execution envelope.
//!
//! Every fetch runs inside a sealed context capturing:
//! seed, timestamp, headers, DNS resolution snapshot, TLS fingerprint,
//! and browser config (if applicable).
//!
//! The envelope is immutable after construction. It is the critical
//! abstraction that makes both determinism (Law 1) and replay fidelity
//! (Law 5) possible.
@copyleftdev
copyleftdev / harness.rs
Created April 12, 2026 02:36
Palimpsest: Determinism Verification Harness
//! Determinism verification harness.
//!
//! Crawls a SimulatedWeb twice with the same seed and asserts
//! bit-identical results. Any divergence is a Law 1 violation.
use std::path::Path;
use std::sync::Arc;
use chrono::Utc;
use palimpsest_core::hash::ContentHash;
@copyleftdev
copyleftdev / gist:05bc06a3e9ab8c8c290ee90b36c419c1
Created April 12, 2026 02:36
Palimpsest: Browser Determinism Layer (JS Overrides)
// Palimpsest Determinism Layer (Law 1)
// Injected BEFORE page navigation to ensure all JS execution
// is deterministic for a given seed.
// Freeze Date.now() to the envelope timestamp.
const __palimpsest_base_time = ENVELOPE_TIMESTAMP_MS;
let __palimpsest_time_offset = 0;
Date.now = function() {
__palimpsest_time_offset += 1;
return __palimpsest_base_time + __palimpsest_time_offset;
@copyleftdev
copyleftdev / types.rs
Created April 12, 2026 02:36
Palimpsest: Seeded PRNG (CrawlSeed)
//! Core domain types shared across all crates.
use rand_chacha::ChaCha8Rng;
use rand_chacha::rand_core::SeedableRng;
use serde::{Deserialize, Serialize};
use url::Url;
use crate::hash::ContentHash;
use crate::time::CaptureInstant;
@copyleftdev
copyleftdev / gist:0329753d659ea2cb5503ca6c1d6eb565
Created April 12, 2026 02:36
Palimpsest: The Six Laws (CLAUDE.md excerpt)
## The Six Laws (Never Break These)
1. **Determinism** — Frontier ordering is seed-driven. Retry logic is explicit. No hidden randomness anywhere. No `rand` in core paths — seeded PRNG only.
2. **Idempotence** — Same URL + same execution context = identical artifact hash.
3. **Content Addressability** — All artifacts are BLAKE3 hash-addressed. Deduplication is structural.
4. **Temporal Integrity** — Every capture binds wall clock + logical clock + crawl context + dependency chain.
5. **Replay Fidelity** — Stored artifacts must be sufficient to reconstruct the HTTP exchange, DOM state, and resource dependency graph.
6. **Observability as Proof** — Every decision is queryable. Every failure is replayable. Every artifact is verifiable.
@copyleftdev
copyleftdev / IOC_SUPPLEMENT.md
Last active March 29, 2026 04:45
Supplemental IOC & Infrastructure Intelligence — Toll Booth Phishing Deep Dive (follow-up to Ben Polonsky writeup)

Supplemental IOC & Infrastructure Intelligence

Toll Booth Phishing Campaign — Deep Dive Follow-Up

Context: This supplements Ben Polonsky's writeup with net-new findings from active infrastructure reconnaissance conducted 2026-03-28. All probing was passive/non-invasive against already-identified phishing infrastructure.


1. Backend Framework Identification

The article identified OpenResty 1.29.2.1 as the web server. Behind it sits a second layer:

@copyleftdev
copyleftdev / github_traffic_stats.py
Created January 20, 2026 04:39
Fetch GitHub traffic stats (views/clones) for all your repositories using gh CLI
#!/usr/bin/env python3
"""Fetch GitHub traffic stats for all repositories using gh CLI."""
import json
import subprocess
import sys
from concurrent.futures import ThreadPoolExecutor, as_completed
def run_gh(args: list[str]) -> dict | list | None:
"""Run gh api command and return parsed JSON."""
@copyleftdev
copyleftdev / jq-cheatsheet.md
Created January 1, 2026 07:03
The Ultimate JQ Cheat Sheet - Comprehensive guide to jq command-line JSON processor
@copyleftdev
copyleftdev / test_cases.json
Created December 29, 2025 01:18
Proteus Deterministic Entropy Benchmark - Test Suite
[
{
"id": "cards_structure_seed_100_low_entropy",
"category": "structure",
"description": "Verify minimal card count at low entropy",
"url": "https://proteus-target.vercel.app/lab/cards?seed=100&entropy=0.1&profile=structure",
"parameters": {
"seed": 100,
"entropy": 0.1,
"profiles": [