mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
Mechanically re-derived: bin/debrand runs over a fresh import of posthog/posthog@fa1a9a60d4 (2026-08-06). The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md and the squashed initial migration are restored from the shipped tree, same as the previous import. The prune's import-closure guard kept 21 products the new core now imports; dropping them is a refactor now, recorded rather than forced.
1.6 KiB
1.6 KiB
Engineering analytics: read the contract before designing
This is an isolated product with an explicit, locked engineering contract. Before designing or changing anything here, read both in full; don't re-derive what's already decided (you'll get it subtly wrong):
@SPEC.md @README.md
The decision most often re-derived wrong: CI ↔ PR linkage is by PR number (the run's pull_requests association), never head SHA.
A head-SHA join silently drops every push but the latest, because the github_pull_requests snapshot keeps only the current head.
See SPEC §6 (Locked decisions).
head SHA is a per-commit precision key only; head_branch is the capture-time / fork fallback.
Two sanctioned exceptions, so you don't "fix" either back:
commit_pr_numberjoins a default-branch run'shead_shato a merged PR'smerge_commit_sha. That is a different key from the banned one: terminal and immutable after merge, one commit per PR, so it drops nothing. It stays correct only while gated onmerged_at(open PRs carry a throwaway test-merge SHA) and deduped to one row per SHA (a raw join fans a run row out and multiplies downstream counts).- A merge-queue gate run takes its
pr_numberfrom its own branch name (trunk-merge/pr-<n>/…), not from itspull_requestsassociation. The association is present but names the throwaway PR the queue opened, not the PR being landed. The branch name is immutable for the branch's life and names exactly one PR, so it carries none of the ambiguity the head-SHA ban is about. Defined once inlogic/merge_queue.py; see SPEC §6.