[12:19:51] Consider replacing "A section identifier is either an integer section number (0 = lead, 1 = section starting with the first heading, etc.), or a string like T-1, in which case the section number is counted as if the page was being transcluded (e.g. a section wrapped in <includeonly> can only be identified in this mode)." with: [12:19:51] https://www.mediawiki.org/wiki/API [12:19:52] :Parsing_wikitext and https://www.mediawiki.org/wiki/API:Parsing_wikitext/TOCData ... no didn't know about these before, I just discovered them now. (re @lucaswerkmeister: I don’t know why you bothered to ask ChatGPT, it sounds like you had already figured out that it doesn’t take a section title… b...) [12:23:45] Yes, I understand that chat bots can't "think". Actually I just found that it gave me outdated information. "Trust, but verify"" *Deprecated. prop=sections has been deprecated. Please use prop=tocdata instead.* (re @wmtelegram_bot: @Bill: I see your frustration, and I'm sorry. Also if an LLM could explain what to do for you it is actually documented ...) [13:12:29] maybe better to stick to plain text for the IRC bridge (re @Bill: Yes, I understand that chat bots can't "think". Actually I just found that it gave me outdated information. "Trust, but verify""...) [13:19:02] OK, this would be easier for me if we could discuss stuff like this on a wiki talk page, but everyone insists that IRC is better. I still don't really use IRC so am unaware of its limitations. (re @jeremy_b: maybe better to stick to plain text for the IRC bridge) [13:33:00] so "rvsection" in "API:Revisions" is equivalent to "tocdata"—>"sections"—>"number" in "API:Parsing wikitext", correct? Note the difference between "number" and "index" in how subsections are handled. [13:40:36] I think rvsection corresponds to index, not number, but given the warning at https://www.mediawiki.org/wiki/API:Parsing_wikitext/TOCData#index it seems unwise to rely on that [13:40:48] (but it certainly can’t be the number if the number looks like 1.2.3) [16:14:06] Explaining my current project. I'm primary support for the botclasses.php framework https://en.wikipedia.org/wiki/User:RMCD_bot/botclasses.php function edit supports editing a section $section but I've yet to try using it for that. Before an app can edit a section it first needs to read the section it wants to make changes to. I want to upgrade function getpage to get a [16:14:06] named se [16:14:06] ction of a page, and then edit that section. "index" appears to be an integer, assigned in lexical order of the original wikitext, but this should not be relied on or considered stable, though it's valid for use for a section edit hash is as a parameter, as used by my function edit. I guess my API can assume it's valid when read (no template transclusion interfering) but [16:14:06] verify [16:14:07] by checking the actual section title returned, and error when not matched rather than editing the page. Feels like a clunky solution, but better than nothing. [16:27:47] in the API sandbox, doing a prop=revisions query, sending rvsection=1.2 does not return an error warning for making an invalid request. It just returns rvsection=1 ignoring the ".2" [21:45:57] !log bd808@tools-bastion-14 tools.wheres-my-code-running Hard restart to pick up container from d796189c and bump CPU to 1 core (T435662) [21:46:01] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.wheres-my-code-running/SAL [22:22:49] bd808: phab-ban is down - 500 [22:23:25] looking [22:26:45] !log bd808@tools-bastion-14 tools.phab-ban `webservice restart` after user reports of 500 responses. Logging was not helpful for a cause. [22:26:47] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.phab-ban/SAL [22:27:46] restart seems to have worked JJMC89. I don't know what broke :/ [22:28:35] also... that app needs to go on my list of things to update for modern toolforge practices. E_TOO_MANY_PROJECTS [22:31:05] ty