Repository navigation
Conversation
…rd says The epic record (specs/api/files/epics.md §5.1) says `budget.duration` is a number of seconds or null; the record was written with `Budget`'s own JSON, which says it in ISO 8601 -- `P68Y180D` for a long one. Co-authored-by: Cursor <cursoragent@cursor.com>
…8601 A page says a budget's duration in seconds, and a start or a save from it wrote that into the settings as it was, where `api/settings.md` §5.2.7 says an ISO 8601 duration beside every other limit, as the terminal interface writes one. Co-authored-by: Cursor <cursoragent@cursor.com>
pydantic writes a duration of 365 days or more in years, `P1Y`, which the page could not read: Resume opened on no time limit at all, and every flow but chat refused to start without one. Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
On
hmz web, Resume on an epic whose budget allowed a year or more opened on no time limit at all, so every flow butchatrefused to start:rlar needs at least one limit on what it may spend.pydantic writes atimedeltaof 365 days or more in years (P1Y,P68Y180D), and the page'ssecondsOfread days and less only. It now reads years too, as the 365 days pydantic writes one as.Fixing that turned up two places where a budget's duration is written otherwise than the specs say:
specs/api/files/epics.md§5.1 saysbudget.durationis a number of seconds or null;Runnerwrote it withBudget's own JSON, in ISO 8601. It now writes seconds. Every reader validates it as aBudgetor hands it to the page, which reads both, so epics written before still read.specs/api/http.md§11.4.2 and §8.3.5 say a save or a start writes it asspecs/api/settings.mddefines it, and §5.2.7 there says an ISO 8601 duration beside every limit, as the terminal interface writes one. The page's seconds were written as sent. They are now written that way; a duration that is not one is left as sent, so a start with it is still refused by its host (§8.3.4).hmz.webdoes this with pydantic alone, since its layer may not importhmz.flows.How it was tested
tests/system/web/test_web_page.py::test_an_epic_given_a_year_or_more_is_resumed_on_its_budget(new), on Chromium and WebKit: an epic whose record saysP1Yis resumed from its page on 525600 minutes and picked up, and a new epic of the flow then opens on that year from the saved setup. Without thedom.jschange it fails at the minutes field.tests/integration/test_web_site.py::test_the_budget_saved_for_a_flow_says_its_duration_as_settings_does(new) andtests/integration/test_core_exec.py::test_a_spent_duration_ends_a_loop_as_an_ordinary_stop(now checks the seconds): each fails without its change.secondsOfagrees with pydantic on 616 durations, from none to over a thousand years.uv run pre-commit run --all-filespasses, anduv run pyteston macOS: 6729 passed, 33 skipped. That was with two things of this machine kept out of the suite, which it does not keep out itself: thegrok,piandqweninstalled in/opt/homebrew/bin, which Humanize looks in offPATH, and an inheritedNODE_COMPILE_CACHE. test: hide agents installed off PATH, and an inherited NODE_COMPILE_CACHE #526 closes both.Checklist
!if it breaks something.tests/unit/,tests/integration/ortests/system/(where a test goes).specs/. A spec changed only where an issue asked for it.uv run pre-commit run --all-filesanduv run pytestpass.