René's URL Explorer Experiment


Title: ifcopenshell.util.sequence applies a single-day IfcWorkTime exception to every earlier date · Issue #9128 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: ifcopenshell.util.sequence applies a single-day IfcWorkTime exception to every earlier date · Issue #9128 · IfcOpenShell/IfcOpenShell

X Title: ifcopenshell.util.sequence applies a single-day IfcWorkTime exception to every earlier date · Issue #9128 · IfcOpenShell/IfcOpenShell

Description: Bug Description ifcopenshell.util.sequence.is_day_in_work_time() evaluates the Start and Finish range of an IfcWorkTime incorrectly. For a single-day calendar exception with: Start = 2026-12-25 Finish = 2026-12-25 the exception: incorrec...

Open Graph Description: Bug Description ifcopenshell.util.sequence.is_day_in_work_time() evaluates the Start and Finish range of an IfcWorkTime incorrectly. For a single-day calendar exception with: Start = 2026-12-25 Fin...

X Description: Bug Description ifcopenshell.util.sequence.is_day_in_work_time() evaluates the Start and Finish range of an IfcWorkTime incorrectly. For a single-day calendar exception with: Start = 2026-12-25 Fin...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9128

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ifcopenshell.util.sequence applies a single-day IfcWorkTime exception to every earlier date","articleBody":"### Bug Description\n\nifcopenshell.util.sequence.is_day_in_work_time() evaluates the Start and Finish range of an IfcWorkTime incorrectly.\n\nFor a single-day calendar exception with:\n\nStart  = 2026-12-25\nFinish = 2026-12-25\n\nthe exception:\n\nincorrectly applies to every date before 2026-12-25;\nincorrectly does not apply on 2026-12-25 itself.\n\nAs a result, a valid future holiday may cause all preceding weekdays to be reported as non-working days. This affects scheduling helpers that rely on is_working_day(), including date offsetting and task-time recalculation.\n\nEnvironment\nConfirmed with IfcOpenShell 0.8.5\nPython 3.11\nIFC schema: IFC4\nLinux\nThe same range implementation is also present in the source from 2026-07-26 used around the 0.8.6a260726 daily build:\nhttps://github.com/IfcOpenShell/IfcOpenShell/blob/8deefe497cca8b9fd41e29e809ec0d0ad9478169/src/ifcopenshell-python/ifcopenshell/util/sequence.py#L203-L220\nMinimal reproduction\n\nThe following script creates:\n\na Monday-to-Friday work calendar;\nworking hours from 08:00 to 16:00;\none non-recurring exception on 2026-12-25;\na minimal calendar_exception_bug.ifc test file.\n\n\nActual result\n\nOn the affected implementation:\n\n2026-09-07: exception_applies=True,  working_day=False\n2026-12-25: exception_applies=False, working_day=True\n2026-12-28: exception_applies=False, working_day=True\n\nThe first regression assertion fails.\n\nExpected result\n2026-09-07: exception_applies=False, working_day=True\n2026-12-25: exception_applies=True,  working_day=False\n2026-12-28: exception_applies=False, working_day=True\n\nAn IfcWorkTime with Start == Finish should apply on that date only. The Start and Finish boundaries should be inclusive.\n\nSuspected cause\n\nThe current implementation performs two independent assignments:\n\nif start:\n    result = day > start\nif finish:\n    result = day \u003c finish\n\nThere are two problems:\n\n> and \u003c exclude the Start and Finish dates themselves.\nThe Finish result overwrites the earlier Start result instead of combining both range conditions.\n\nFor Start == Finish == D, this effectively returns True for dates before D and False for D itself.\n\nThe intended range check appears to be equivalent to:\n\nreturn (\n    (start is None or day >= start)\n    and (finish is None or day \u003c= finish)\n)\nImpact\n\nThis is more than an isolated boolean error:\n\none future ExceptionTime can mark every preceding weekday as non-working;\noffset_date() may move dates far beyond the intended range;\nget_soonest_working_day() and get_recent_working_day() may return incorrect dates;\na backwards search may continue indefinitely because every earlier date remains covered by the future exception;\nsequence.edit_task_time() and schedule cascading can therefore return incorrect dates or appear to hang when a real calendar is assigned.\n\nThe IFC data itself is valid. The issue appears to be limited to the interpretation in ifcopenshell.util.sequence.\n\nSuggested regression coverage\n\nPlease cover at least:\n\na one-day work time where Start == Finish;\nthe exact start and finish boundaries of a multi-day work time;\ndates before and after the range;\nboth WorkingTimes and ExceptionTimes;\nforward and backward working-day searches.\n\n\n[reproduce_ifcopenshell_calendar_exception_bug.py](https://github.com/user-attachments/files/30547144/reproduce_ifcopenshell_calendar_exception_bug.py)\n\n```\nC:\\Users\\pahlawan\\GITT\\IfcOpenShell_Scripts\\.venv\\Scripts\\python.exe C:\\Users\\pahlawan\\GITT\\IfcOpenShell_Scripts\\test.py \nTraceback (most recent call last):\n  File \"C:\\Users\\pahlawan\\GITT\\IfcOpenShell_Scripts\\test.py\", line 91, in \u003cmodule>\n    assert not sequence.is_work_time_applicable_to_day(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError\nIfcOpenShell: 0.8.6-alpha260726\n2026-09-07: exception_applies=True, working_day=False\n2026-12-25: exception_applies=False, working_day=True\n2026-12-28: exception_applies=False, working_day=True\n\nProcess finished with exit code 1\n\n\n### Attachments\n\n``\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/PahlawanJoey","@type":"Person","name":"PahlawanJoey"},"datePublished":"2026-07-30T13:16:36Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9128"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0346f42e-7ae2-96e2-6c91-79703659edac
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id903C:10338A:8EB391:C51A2B:6B04758D
html-safe-nonce1951e66aba55d320f72da32ad9416ded163378f2a86ee19c09a130a201e88105
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDNDOjEwMzM4QTo4RUIzOTE6QzUxQTJCOjZCMDQ3NThEIiwidmlzaXRvcl9pZCI6IjM0MDg3NzcxNDM2MDQ1MDgwNDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac94137291ec2d9cf3b91d004cfd7c2c4841924f5c68cdbd9524a381db64660736
hovercard-subject-tagissue:5020122030
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/9128/issue_layout
twitter:imagehttps://opengraph.githubassets.com/68eb531e5ecf4f2f7c8fa2363a37d066ca016d9e5a5e8ed805b05882e1bd4164/IfcOpenShell/IfcOpenShell/issues/9128
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/68eb531e5ecf4f2f7c8fa2363a37d066ca016d9e5a5e8ed805b05882e1bd4164/IfcOpenShell/IfcOpenShell/issues/9128
og:image:altBug Description ifcopenshell.util.sequence.is_day_in_work_time() evaluates the Start and Finish range of an IfcWorkTime incorrectly. For a single-day calendar exception with: Start = 2026-12-25 Fin...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePahlawanJoey
hostnamegithub.com
expected-hostnamegithub.com
None9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b
turbo-cache-controlno-preview
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecf73f57448d52b3a7b619195e182b33d3b3454ca
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/9128#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9128
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9128
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9128
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9128
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9128
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests937 (937)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
https://github.com/IfcOpenShell/IfcOpenShell
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9128
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9128
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
ifcopenshell.util.sequence applies a single-day IfcWorkTime exception to every earlier datehttps://github.com/IfcOpenShell/IfcOpenShell/issues/9128#top
PR ProposedA PR has been proposed for this bug/feature.https://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com/PahlawanJoey
PahlawanJoeyhttps://github.com/PahlawanJoey
on Jul 30, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9128#issue-5020122030
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/util/sequence.pyhttps://github.com/IfcOpenShell/IfcOpenShell/blob/8deefe497cca8b9fd41e29e809ec0d0ad9478169/src/ifcopenshell-python/ifcopenshell/util/sequence.py#L203-L220
8deefe4https://github.com/IfcOpenShell/IfcOpenShell/commit/8deefe497cca8b9fd41e29e809ec0d0ad9478169
reproduce_ifcopenshell_calendar_exception_bug.pyhttps://github.com/user-attachments/files/30547144/reproduce_ifcopenshell_calendar_exception_bug.py
PahlawanJoeyhttps://github.com/PahlawanJoey
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
on Jul 30, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9128#event-28722270027
https://github.com/petruconduraru
petruconduraruhttps://github.com/petruconduraru
on Jul 30, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9128#issuecomment-5135105576
@PahlawanJoeyhttps://github.com/PahlawanJoey
#9106https://github.com/IfcOpenShell/IfcOpenShell/pull/9106
#9106https://github.com/IfcOpenShell/IfcOpenShell/pull/9106
#9147https://github.com/IfcOpenShell/IfcOpenShell/pull/9147
#9106https://github.com/IfcOpenShell/IfcOpenShell/pull/9106
petruconduraruhttps://github.com/petruconduraru
PR ProposedA PR has been proposed for this bug/feature.https://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
on Aug 3, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9128#event-28884074148
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9128
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9128
PR ProposedA PR has been proposed for this bug/feature.https://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
Bughttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=type:"Bug"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.