Four places in our blog tooling, the digest, social, lesson and daily_backfill, now get a post’s URL id from one function, and that id carries no date.
One function for the URL id
The commit is titled “blog: URLs carry no date.” It adds blog/urls.py, whose url_id is the one place that turns a post file name into its URL id. The digest, social, lesson and daily_backfill code all use it. It pairs with a matching commit in the landing site’s repo.
The gate
The split-gate fell back to a full local run, and 16057 passed.
The work_date commit
The same day’s log has a second commit about dates, the work_date backfill provenance: 394 of 695 published posts sourced, plus a line in the Analyses index.
Why a redate can’t leave a dated URL
Because url_id is the one place that turns a post file name into a URL id, and all four paths use it, a redate can never leave a dated URL behind.
AI Skills
Use this lesson with the AI assistant you already use
Four parts of the blog tooling, the digest, social, lesson and daily_backfill code, now get a post's URL id from a single function, `url_id` in `blog/urls.py`, and that id carries no date. The change shipped with a matching commit in the landing site's repo, and the split-gate fell back to a full local run where 16057 passed.
Paste the prompt, share only the context needed to answer it, and treat the result as a draft for your review. Do not include confidential information or let an AI assistant make changes without your approval.
Optional: for a visual report and saved memory, run /dxdev first.
Don’t have it? Get it at dxdev.com/skills/dxdev. The prompt works without it.
dxdev LESSON · paste into your AI coding agent
LESSON: Derive Every Path's URL Id From One Function So A Redate Cannot Leave A Dated URL Behind
SOURCE: dxdev.com/blog/dates-in-urls-pin-a-post-to-a-day
WHAT HAPPENED: A commit titled "blog: URLs carry no date" added `blog/urls.py`, whose `url_id` is the one place that turns a post file name into its URL id. The digest, social, lesson and daily_backfill code all call it instead of building the id themselves. A matching commit landed in the landing site's repo. The split-gate fell back to a full local run, and 16057 tests passed. The same day's log also had a separate commit about dates, the `work_date` backfill provenance, which sourced 394 of 695 published posts and added a line to the Analyses index.
THE RULE: When several code paths must agree on how an identifier is derived, route them all through one function so the property you need holds by construction. Then a later change, such as redating a post, cannot leave a stale, date-bearing URL in any one path.
CHECK MY CODE, then report PASS or FAIL with file:line for each:
1. Search the codebase for every place that builds a post URL id from a file name and confirm each one calls `url_id` in `blog/urls.py` instead of deriving it inline.
2. Confirm that `url_id` output contains no date, and that redating a post leaves its URL id unchanged in the digest, social, lesson and daily_backfill paths.
3. Confirm a new code path that needs a URL id cannot be added without going through the shared function, for example with a test that fails when a dated URL is produced anywhere.
THEN PRINT: a table (check, PASS/FAIL, evidence, fix) + a verdict (applies / partially / OUT_OF_SCOPE / no) + the single most important next action.