AI Lab: Vetting a Story Dossier and Search Data in Code

On this page

An AI-assisted tech newsroom runs into two mirror-image mistakes. The first happens before writing: turning an incomplete lead into an article, backed by a single link or a days-old announcement, simply because a calendar slot is open. The second happens after publication: checking Search Console forty-eight hours later, seeing almost no clicks, and concluding that readers do not care, even though daily figures are not final yet.

After walking through how we link IT, EN, and ES translations without breaking hreflang last week, today we open the newest check in our pipeline: androidlab_editorial_pattern.py. It is a preflight and measurement script that operates at two separate moments: before drafting it validates the candidate dossier, and after publication it calculates when a Search Console window is actually ready to read.

Before writing: the structured dossier and its entry gates

When we evaluate a fresh technical topic on AndroidLab, the evaluate command reads a local JSON file and requires explicit documentation before drafting or image generation begins. It does not hunt for magic keywords: it enforces a concrete set of structural gates.

  • Eleven mandatory text fields: topic, project_name, version_or_change, search_phrase (treated as an editorial hypothesis, never a fake Search Console metric), reader_task, technical_evidence, verified_boundary, distinct_angle, primary_url, second_url, and event_at. If even one field is blank, the dossier is blocked.
  • Two distinct HTTPS hosts and HTTP 200 status: both the primary and secondary sources must use HTTPS on different domains (two URLs on the same host, such as two GitHub pages, fail the check) and both must carry verified 200 status. In addition, primary_is_first_party must be true: we require direct project documentation or release notes, not just secondhand rewrites.
  • A 96-hour freshness window with explicit timezone: event_at must follow ISO 8601 / RFC 3339 with a timezone offset. A naive timestamp without timezone is rejected. If the event is older than 96 hours against current UTC time (or more than one hour in the future), the candidate fails the freshness gate.
  • Explicit deduplication check: dedupe_checked must be confirmed and duplicate_topic must not be true. If the subject is already covered, the script points toward updating the existing piece instead of creating a clone.

Every violation is collected into a blockers list. Whenever that list is non-empty, pilot_ready stays false and the workflow stops before spending writing time or API credits. Even when every gate passes, the output prints a blunt reminder: this is a dossier preflight only, and independent source, content, author, budget, and publisher checks remain mandatory.

After publishing: why we do not read Search Console too early

The second trap in data-informed publishing is rushing to judge results. In Google’s Search Console API (searchanalytics.query), daily numbers can be queried with dataState set to final or with preliminary figures still settling, and daily buckets follow Pacific Time (America/Los_Angeles), not Italian local time or UTC.

If we publish an article at 02:00 UTC on December 1, Search Console still records its publication day as November 30 in Pacific Time. Eyeballing a week of metrics makes it easy to include partial days or compare misaligned periods. That is why the windows subcommand in androidlab_editorial_pattern.py automates two exact steps:

  • Conversion to the Pacific publication day: it parses the ISO 8601 publication timestamp, converts it to America/Los_Angeles, and anchors the real starting date of the report.
  • Complete 7-day and 28-day windows: it skips the partial release day and computes intervals from day +1 to +7 and from day +1 to +28. It then compares each window’s end date against last_final_date, the latest confirmed final day in Search Console.

Until last_final_date reaches at least the final day of the interval, the ready flag stays false. In the repository’s unit tests, for instance, an article published on November 27 at 20:36 UTC has a 7-day window from November 28 to December 4: with last_final_date at December 1, the window is still not ready, while the 28-day window only becomes readable once final data reaches December 25. Nobody mistakes delayed reporting for zero reader demand.

Where the code stops and editorial judgment remains

A preflight like this eliminates mechanical errors and keeps cross-article comparisons honest, but it does not decide what deserves to be published. As the script’s own docstring states, androidlab_editorial_pattern.py does not fetch URLs and does not certify the truth of claims inside the JSON file. A dossier can pass all eleven fields, list two HTTPS hosts returning HTTP 200 within 96 hours, and still describe a marketing-inflated announcement or a feature readers do not care about.

The same boundary applies to 7-day and 28-day windows: waiting for finalized data prevents premature verdicts, yet a single spike or dip in impressions does not prove a format works or fails on its own, because seasonality, competition, and overall domain trends all play a part. Code keeps us from flying blind or reading immature numbers; judging whether a story genuinely helps the reader, in line with Google’s people-first content guidance, remains an editorial call.

In short

  • androidlab_editorial_pattern.py splits quality control into two stages: dossier validation before writing (evaluate) and finalized Search Console window calculation after release (windows).
  • The preflight requires eleven populated fields, two distinct HTTPS hosts with verified HTTP 200, a first-party primary source, deduplication confirmation, and a fresh event within 96 hours carrying an explicit RFC 3339 timezone.
  • The 7-day and 28-day windows use America/Los_Angeles, start on the day after publication, and stay unready until last_final_date covers the full range.
  • The script stops incomplete dossiers and premature metric readings, but it cannot verify source accuracy or real usefulness to readers.

AUTHOR

IT specialist, developer and systems engineer with a long history across code, Linux servers, retrocomputers and e-learning platforms. On AndroidLab he brings a technical, pragmatic eye: less brochure smoke, more attention to infrastructure, usability, privacy, updates and the real consequences of manufacturers' choices.

Leave a Comment