# The Mechanic research record

## Frozen source

This exhibit is a hand-curated reconstruction of the public X For You source at [`xai-org/x-algorithm@fad2f71edc780ab14e4cfaebbb8b221385782e43`](https://github.com/xai-org/x-algorithm/tree/fad2f71edc780ab14e4cfaebbb8b221385782e43), committed 2026-09-16 01:11:22 UTC (September 15 in Pacific time). The repository has no tagged releases, so the commit identifies the exact version used here. The source was retrieved on September 15, 2026 Pacific time.

The corpus uses only that repository version for the mechanism graph. It does not merge the 2023 [`twitter/the-algorithm`](https://github.com/twitter/the-algorithm) architecture with the newer Phoenix/Thunder/VMRanker stack. The January 2026 initial `xai-org/x-algorithm` commit is also excluded because the repository's August update says it added ranking configuration, visibility systems, and the model code used to train the feed models. Combining versions would create a system no single published snapshot describes.

There is a provenance wrinkle worth keeping visible: the [current X Help overview](https://help.x.com/en/resources/recommender-systems/for-you-home-timeline-recommendations) still links the historical `twitter/the-algorithm` repository, while `xai-org/x-algorithm` self-describes as the core code for X's For You feed. The Help page supports only broad product-level statements and is mutable, so it is not an evidence artifact in the frozen corpus.

## What this can and cannot establish

The direct claims say what specific public files contain at the frozen commit. They do not establish what X runs for a particular viewer, request, geography, client, or experiment. The repository itself says many tunable values come from configuration, checked-in defaults are synchronized toward primary production values, notable experiments should appear, and some prompts, rules, deployment code, data feeds, orchestration, and telemetry are absent. Those statements define the limit of the source rather than a route around it.

Every growth hypothesis is therefore an inference and a proposal for an external test. A direct mechanism can support an inferred hypothesis without proving the treatment will improve reach. Confidence scores rate how well the frozen evidence supports the reasoning chain; they are not probabilities of lift. There is no runtime research agent, live X API, live model output, or claim of current production verification.

One interpretation error deserves special attention. The checked-in weights multiply a viewer-specific predicted probability or a continuous model value. They do not multiply raw like, reply, block, or report counts. A ratio between weights is not an exchange rate between observed actions. The experiment language preserves that distinction.

## How the public page is organized

The Mechanic presents mapping a tool's rules and testing which modeled change matters for a chosen goal. After a short introduction, readers choose a fictional post and goal, then see the model response. A unified carousel shows the filter → score → adjust → select path one full-width step at a time. Optional live controls sit in that same section and follow the selected step; without JavaScript, all four explanations remain visible. The X system map is optional. Three rules explain the source in everyday language: predicted actions carry different weights; posts from one author can compete in a single feed request; and some replies and reposts are removed before scoring. The final sections offer questions that transfer to other tools and the original source and method. The full 29-excerpt corpus and six detailed study designs remain downloadable. The companion motion plate is kept in the gallery and source archive for a separate tool page; it is not embedded in this page's hero.

The reusable prompt asks for deep investigation of connected growth, distribution, notification, and delivery paths in a codebase, then ranks goal-specific, user-controllable levers and feasible tests. It asks for file-and-line evidence, small calculations where possible, and a distinction between a large code coefficient and a large outcome effect. The short suggestions on the page compare a recent batch of posts with a later batch over the same 24-hour window. They are practical starting checks, not matched experiments: topics, posting times, audiences, and other conditions can change between batches. A difference can motivate a better controlled follow-up; it cannot by itself establish that the code mechanism caused the change. The more detailed study designs in the corpus specify stronger controls where feasible.

## Method

1. Clone the public repository and pin the exact commit SHA.
2. Read the request path, configuration, filters, scoring adjustments, reranker, selector, and served-history side effect as one versioned system.
3. Preserve each cited file under `sources/` using its original repository path.
4. Store exact source text for each line range in `corpus.json`, plus the SHA-256 of the complete file and a GitHub link to that commit.
5. Reconstruct mechanism nodes and directional edges. Use `direct` only where the code or first-party repository documentation states the mechanism; use `inference` for the feedback connection and for every proposed growth hypothesis.
6. Classify controls as direct, indirect, exogenous, or disallowed. Only legitimate direct or indirect levers enter experiments.
7. Rank tests editorially by evidence-chain confidence, information value, possible impact, and cost. These ratings prioritize what would be useful to learn; they are not forecasts.

## Editorial taxonomy

The authored surface baseline and the mechanism-derived tests share the same broad lever vocabulary: timing, cadence, media, interaction framing, semantic variety, audience relationship, and interest fit. The mechanism pass adds specificity such as original-post eligibility, same-author candidate collision, mutual-follow conditional weighting, and set-level semantic competition. It may add few or no new broad levers. That is an acceptable result: the value can be a sharper causal contrast or a cleaner null test rather than a larger count.

The six proposed tests were kept because each distinguishes at least two explanations and can return a null result:

- original post versus reply/repost discovery eligibility;
- clustered versus spaced same-author posts;
- substantive question-led versus declarative original posts for mutual-audience distribution;
- semantically varied versus narrow repeated series;
- reference/share-oriented versus visible-reaction-oriented framing;
- a smooth freshness decay versus a discontinuity around the published 48-hour candidate-age bound.

New-author exploration remains in the graph because it is a meaningful public mechanism. It is not an experiment recommendation: eligibility and experiment assignment are exogenous, and creating accounts to chase the condition would be both invalid and badly confounded.

## Preserved source manifest

All paths are relative to this directory. `sources/LICENSE` is the repository's Apache License 2.0 text.

| Path | SHA-256 |
|---|---|
| `sources/README.md` | `203d9b6ee7495c7160cb59185125d3aaaa6b3bd75ecb4e48b3af6a5c4c8938e5` |
| `sources/LICENSE` | `c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4` |
| `sources/docs/BIDIRECTIONAL_BOOST_CHANGE.md` | `b7e0a74cb4c3149c4c9b5bea9bc4435abb8faec5bf2a63d5be965f63bc65c131` |
| `sources/home-mixer/params/param.rs` | `baa02bf4e0bcf4534022880080adbe3aacfda69353959141fdaefef4e26dac22` |
| `sources/home-mixer/params/config.rs` | `8e603c15d103635aba7e3ca6b94b5dd6ca03497b653d59c668eb67e693c15908` |
| `sources/home-mixer/candidate_pipeline/phoenix_candidate_pipeline.rs` | `6443a46ea824d00d08c3f12963fe20212a3a29b60fd7ccb830f1579949afd22d` |
| `sources/home-mixer/filters/age_filter.rs` | `8b071a27cfcadbcc2cdeee6b9b2c58a4eafc55d5eedae37f02abd028f106739e` |
| `sources/home-mixer/filters/oon_retweet_reply_filter.rs` | `4260fcf0e1478cf3b856a35cf222a524c717faff79eb52e8f7caf884674a866d` |
| `sources/home-mixer/scorers/ranking_scorer.rs` | `c1d3a38a944ab130ff2d4064c60ac82bc089e8f176f05be7d5d4cf28afd8666e` |
| `sources/home-mixer/scorers/author_cold_start.rs` | `ad0dc6f90e5162d674258e2839cb1ce6c971c58637e2c0ca04f3aa8dc39ae036` |
| `sources/home-mixer/scorers/vm_ranker.rs` | `218801c2af969410a3936a97a887fd116d0a7cd0406bc33a6c1c7d7b05a1ea0a` |
| `sources/home-mixer/selectors/top_k_score_selector.rs` | `f263471272ea8ab27cf75825c9c62360b746a3eb7f8956cdf1977cf665d9ab2d` |
| `sources/home-mixer/side_effects/update_served_history_side_effect.rs` | `75bb09a8ceadfc0241f5af42badefb771b9149b23469ebcf25a6d3ad31fa5281` |
| `sources/vm-ranker/dpp.rs` | `a91d5d977d195391543b67e3a7cda2b4925a4cf05d2d3a555878fa903bf933a9` |
| `sources/vm-ranker/scoring/dpp_model.rs` | `0a98f3c4f3429b69a8c6d0d76dca857529b5a478c7cd3d02e717fabaf7e83b84` |
| `sources/home-mixer/sources/simclusters_source.rs` | `326b3e9806fa10bcdd1f454c1bfeb83a500f2fd87990b6c740f15b613ef22a2d` |
| `sources/home-mixer/sources/phoenix_source.rs` | `499075517699cf19c0fe1d3e30850e1245946a8b0ea6c2ed9963de3028032e73` |
| `sources/home-mixer/sources/thunder_source.rs` | `b66d12f37f011893d70e748085a6cc712406102f519eaff849b7d0ff76a9d220` |

## Availability and maintenance notes

- Links to that specific commit are the canonical online references; `main` is intentionally never used in `corpus.json`.
- GitHub has no published release object for this repository at retrieval time. The commit SHA, local copies, and file hashes are the release substitute.
- The historical engineering-blog link from X Help returned a not-found response during recon, so it is excluded rather than silently replaced with a secondary summary.
- Some implementation imports and production infrastructure are intentionally unavailable. The preserved source files are sufficient to audit the claims shown here, not to reproduce X production.
- If the exhibit is updated, create a new corpus version and rerun line-range and full-file hash verification. Do not silently move the existing version to a newer commit.

## Teaching calculations

The guide exposes selected defaults and isolated operations from this snapshot. Values are parsed from verified `param!` declarations. The ranking example compares two hypothetical weighted probability terms before offsetting, mode-specific logic, and later adjustments; it is not a ranking or reach forecast. The author-diversity example uses the checked-in decay 0.5 and floor 0.25 with a positive starting score of 100. Its position is determined by score ordering, not publication time. The eligibility example reproduces one filter, including the difference between a false and unknown `in_network` value. Passing this filter only permits further processing.

A further exact excerpt, `src-author-diversity-defaults` at `home-mixer/params/param.rs:233–252`, records the default enable flag, decay, and floor from the same preserved file. `src-score-offset`, `src-offset-function`, and `src-network-defaults` preserve the positive offset and score-adjustment defaults used by the simulation. The corpus now contains 29 excerpts. Existing studies remain proposals; these calculations are not external experimental results.

## Partial simulation

The interactive simulation combines a deliberately small subset of the frozen path. Three fictional posts compete for two toy slots. Three coarse invented viewer groups—40 quick readers, 35 useful-reference readers, and 25 conversation readers—supply hypothetical action predictions for 100 synthetic requests. Everyone in a group receives the same two-post feed. The baseline uses the preserved like, reply, DM-share, and copy-link weights, a `0.001` positive-score offset, repeated-author decay and floor, the out-of-network reply/repost filter, and the checked-in `0.75` network factor. The page lets a reader change predictions, post format, relationship state, those four weights, and whether to apply repeated-author diversity.

All other predicted terms are treated as zero. Mutual-follow boost, topic context, new-viewer adjustment, and author cold-start changes are held inactive; the fictional authors are treated as established. Retrieval, other eligibility filters, alternate score modes, VM/DPP reranking, visibility filtering, and blending are omitted. The two-slot budget is chosen for explanation and differs from the source's checked-in top-K of 50.

The fixed baseline selects A in 25, B in 75, and C in 100 of the 100 synthetic requests. Because each request has two slots, those per-post counts sum to 200. They are deterministic outputs from invented inputs, not probabilities, calibrated forecasts, reach, impressions, or evidence of live behavior.

## Objective-conditioned model response

The paired sensitivity view asks how one target post responds when one of four invented viewer-action predictions rises by the same selected number of percentage points across the fixed profiles. The two toy objectives are (1) that target's selections among 100 fictional requests, a limited proxy for possible feed exposure, and (2) modeled reply-action units, calculated as the sum of `selected × profile count × predicted reply probability / 100`. The second expression assumes one opportunity per selection and that the supplied reply prediction would be calibrated conditional on that opportunity. Neither assumption is validated by this exercise; the units are not observed replies. A direct increase to the reply prediction also raises the reply objective partly by arithmetic, not by independent discovery.

Each comparison row changes one predicted chance from the same starting scenario and displays its pre-adjustment weighted-score increment. The detail view shows final score, feed place, people shown, and modeled replies before and after for each reader group. For example, post A reaches 65 people after either a +0.1- or +1-percentage-point copied-link change: the larger change raises score further but crosses no additional group cutoff. Curves sample a declared 0–5-point interval. Thresholds, ties, clipping at 100%, and the two-slot ceiling can create flat regions or jumps; a finite difference is local to its chosen interval and invented group mix. A copied-link change does not bring referral traffic or directly raise reply chance in this model. It can increase modeled replies only by earning a feed place among people who already had a supplied reply chance. Equal prediction-point changes are mathematically comparable inputs, but they are not equal-cost or equally feasible author actions. Format editing remains separate from this chance comparison in the carousel's optional live controls, where assigned predictions stay fixed. Platform weights are checked-in defaults, not author-controllable levers. The effect of actual content or timing on Phoenix predictions is unknown. No universal ranking of growth levers follows from these model responses.

This framing connects to [Growth Is a Search Problem](../../article-growth-is-a-search-problem/): choose a worthwhile objective, inspect plausible directions, and spend measurement effort where a test could reduce uncertainty. A live test would require a specific author-controlled contrast and an observed, predeclared outcome. “For You impressions” would require a verified For You-specific measure; absent that, fixed-window organic impressions can be reported only with source attribution unknown. The model's selected-request count must not be renamed real impressions or causal sensitivity.

Six engine tests, five mechanism tests, five simulation tests, and six sensitivity tests cover validation, evidence binding, arithmetic, filter behavior, matched perturbations, and baseline distributions; run them together with `node --test engine.test.mjs mechanisms.test.mjs simulation.test.mjs sensitivity.test.mjs`. The calculation sources and commit are unchanged; five additional excerpts document candidate-source limits.

## X map and practical test ideas

The map identifies the selected stage and explains what X does, what an author can change, and how that stage connects to the next. Source metadata links directly to the original code. Five plain-language test ideas connect post format, useful sharing, posting intervals, questions, and variety to specific rules and before/after comparisons. Editorial confidence percentages and scores remain data fields rather than on-page measurements. Candidate-source limits are documented with five additional exact excerpts: Thunder defaults to a 1,200-post request maximum, Phoenix to 1,000, and SimClusters caps its own candidate list at 800. These source limits are not summed into a guaranteed candidate pool.

## Response controls and sensitivity guide

The comparison has an explicit selected response (like, reply, message share, or copied link). Its before/after cards and detail view stay in sync with the controls. The reader groups are introduced before their labels appear in an example; each other row then tests an independent chance change against the same baseline. The score increment is visible alongside the resulting reach and reply changes. The practical exercise opens the carousel's shared live controls at the filter step.

The scoring stage displays a Chance / Weight / Adds table for each post, followed by the four contributions plus the 0.001 offset. A separate source-derived guide identifies eligibility gates, heavily weighted responses, and selection cutoffs. For an original post, mutual following raises the default reply weight from 5 to 20. This is a separate calculation from the source; mutual following is not implemented in the current feed simulator. The guide compares equal one-percentage-point changes: like +0.005, base reply +0.05, message share +0.05, copied link +0.20, and eligible mutual-follow reply +0.20. These are changes in weighted score before later adjustments, not guaranteed distribution gains.
