Skip to content

fix(lib): fetch-docs.sh labels X's logged-out shell as a read page #12945

Closed

Description

@kyle-sexton

Problem

lib/fetch-docs.sh --profile generic --public-only reports state: read for an X (x.com) status page when X serves its logged-out shell instead of the article. A caller trusts read as "the page's content", so a skill such as /knowledge:absorb-upstream can build claims on a page that holds no article text.

Evidence

Four runs on 2026-11-03 against https://x.com/addyosmani/status/2117512471930167377, same command, a fresh --out each time:

Run bytes state Body
1 735 read title, two "Log in / Sign up" links, author, view count
2 20278 read full article text
3 20278 read full article text
4 733 read same login shell as run 1

An earlier /knowledge:absorb-upstream run the same day also got the 735-byte shell and fell back to a converter copy.

The script's header says anything that is not a 2xx with an accepted content type is unread (lib/fetch-docs.sh lines 23-25); a 200 text/html login shell passes that test.

Fix

Options for the owner of lib/fetch-docs.sh to weigh:

  • Mark a page unread with a reason such as login-wall when the converted body is a known logged-out shell (for x.com: the redirect_after_login onboarding links with no article body).
  • Or route x.com / twitter.com URLs to unread with a reason pointing callers at /x:read, since the plain fetch is intermittent.

Either keeps "read" meaning "content present".

Verification

Rerun the command above several times; every result is either the full article with read, or unread with a reason. No 7xx-byte login shell is labeled read.

No related issue: found none searching "fetch-docs login wall".

Activity

  1. added
    needs-triage
    on Nov 3, 2026
  2. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    I understood this as a defect: lib/fetch-docs.sh reports state: read for an x.com page when X serves its ~735-byte logged-out shell, so callers can treat a page with no article text as content. The expected fix is that a logged-out shell becomes unread with a reason such as login-wall, and read always means content is present.

    The existing refinement comment on this issue already gives acceptance criteria. Choosing between the two options you listed is an implementation detail inside one script, so I treated it as settled. I found no open duplicate.

    Automated triage, applied by the lanes App.

  3. added and removed
    needs-triage
    on Nov 3, 2026
  4. added
    status: ready
    on Nov 3, 2026
  5. melodic-automation-lanes commented on Nov 3, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  6. added
    status: confirmed
    and removed
    status: ready
    on Nov 3, 2026
  7. added
    needs-triage
    and removed
    status: confirmed
    on Nov 3, 2026
  8. melodic-automation-lanes commented on Nov 3, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: lib/fetch-docs.sh reports a generic-profile page as unread with reason login-wall when the converted body is X's logged-out shell, so read always means article content is present.

    Acceptance criteria

    • In lib/fetch-docs.sh, after convert succeeds at the html-converted step (around line 807), a body that is X's logged-out shell (redirect_after_login onboarding links and no article text) sets state unread with reason login-wall and leaves no file at the destination.
    • The same detection applies to a cache-served or fixture-served page, so a stored shell is never returned as read.
    • The detection is limited to x.com and twitter.com origins; a non-X page with a login link still reads as before.
    • lib/fetch-docs.test.sh gains a fixture for a ~735-byte X login shell and asserts state unread, reason login-wall, and no output file.
    • lib/fetch-docs.test.sh gains a fixture for a full X article page and asserts state read with the article text in the output file.
    • The header comment of lib/fetch-docs.sh and the --help text name login-wall as an unread reason and say a logged-out shell is not a read page.
    • The generated copies under plugins/*/scripts/fetch-docs.sh are regenerated with scripts/sync-shared-copies.sh and match lib/fetch-docs.sh.
    • bash lib/fetch-docs.test.sh passes, and the repository's sync-check for shared copies passes.

    External state: none

    Sources read

    • lib/fetch-docs.sh:21-22: a page is read only with a 2xx status and accepted content type, otherwise unread; the issue cites lines 23-25 but the text is at 21-24
    • lib/fetch-docs.sh:805-811: a 200 text/html body is converted and set to state read with no check on the converted content
    • lib/fetch-docs.sh:83: state is read or unread, with a reason field
    • plugins/knowledge/scripts/fetch-docs.sh:2: the plugin copies are generated from lib/fetch-docs.sh by scripts/sync-shared-copies.sh and must not be hand-edited

    Automated refinement by the lanes App. Intake triages the issue again with it.

  9. 6 remaining items

  10. removed
    admission-deferred
    on Nov 3, 2026
  11. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor
    No description provided.
  12. melodic-automation-lanes commented on Nov 3, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started waited in its slot past a change to its lane workflow files on main, so it stopped before any model turn. The run's report-outcome removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

  13. added
    agent-ready
    and removed
    agent-ready
    on Nov 3, 2026
  14. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor
    No description provided.
  15. melodic-automation-lanes commented on Nov 3, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 41725193553, the work-resolve-issue run that agent-ready started, before it did any work; that run ended at 2026-11-03T23:34:27Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits longer before each one, up to 24 hours.

  16. added
    agent-ready
    and removed
    agent-ready
    on Nov 3, 2026
  17. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor
    No description provided.
  18. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor
    No description provided.
  19. removed
    status: ready
    agent-ready
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    agent-ready

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions