Hacker

Yash Aggarwal

@yashaggarwal1

Joined Oct 2026Student at Thapar Institute of Engineering and TechnologyIndia

Projects

  • Hoist: move hidden feature flags into Flagsmith, safely

    Flagsmith Experimentation HackathonNov 2026

    Hoist is an approval-gated agent that moves a Python codebase's hidden feature flags (env vars and settings constants read with os.getenv) into Flagsmith, then runs the first experiment on one of them. Problem: most apps already have feature flags, they just aren't called that. They're env vars scattered through settings: no per-environment view, no targeting, no audit log, no experiments, and every change needs a redeploy. Moving them by hand is slow and risky, because one wrong default changes production behaviour. Who: teams adopting Flagsmith on an existing codebase. How it works (Find → Migrate → Prove → PR → Experiment → Review → Ship): 1. Find: tree-sitter parses the repo and code classifies each value. Secrets and infrastructure are never migrated. The LLM only helps classify borderline names, after redaction. 2. Migrate: creates the features and per-environment values through the Flagsmith MCP server, then rewrites the reads, exactly, from tree-sitter nodes. The rewritten reads fall back to the old value if Flagsmith is unreachable. 3. Prove: the Flagsmith SDK evaluates every flag in every environment and compares it with the old code. The repo's own test suite runs before and after. 4. PR: opens a pull request with the flag table and the parity proof. Hoist never merges. 5. Experiment + Review: turns a release toggle into a Flagsmith A/B experiment. Code checks the traffic split, the error guardrail and the win probability before it recommends anything. 6. Ship + Cleanup: sets the winner to 100% and tries a cleanup PR, but refuses to open it if the tests regress. Real run on the open-source app linkding: 12 flags found in 11 files (35 values left out); 11 features + 36 environment values written via MCP; 20 reads rewritten; parity 36/36; repo tests 1377 passed / 3 failed both before and after (the 3 already fail upstream); PR: https://github.com/shambhvi2006/linkding/pull/1. Experiment traffic is SIMULATED and labelled. The broken run looked like a 99.9% winner, but Hoist said "don't trust" (traffic split + error guardrail failed). The healthy run (n=12,000) passed every check → ship. The cleanup PR was refused: removing the flag made 8 more tests fail, so a human has to update those tests.

    hoist@shambhvi2006