Repository navigation
Stop counting expired Odoo session files as testing use - #5833
Conversation
A session file Odoo would refuse is stale state, not a person. Use Odoo's own inactivity limit and retired-session marker; an unreadable limit stays UNKNOWN.
|
Review result: weighed Outside review: OpenAI, read-only, on Finding 1 (P1, file age is not Odoo's validity check): declined as a code change, and the overclaim is fixed. Odoo's Finding 2 (P2, zero limit differs on Odoo 19): declined as a behavior change. A configured Other answers from the review: no unknown input now reads as unused, the scan reorder is sound, and a saved positive is bounded by its deadline. It flagged the source parser as the growth to justify. The alternative is a copied number that can drift, which the brief rules out. Inspection: native PyCharm returned UNKNOWN with |
|
Review result: weighed Head |
|
Review result: weighed Head |
|
Ready for the merge train Head: f53534b |
|
Launchplane completed the merge-train step for this pull request.
Launchplane finished the merge-train step for this pull request. Launchplane manages this comment and will update it as the train moves. |
…c48fe5fd15fa12b: merge PR #5833
|
Review result: weighed Head |
|
Ready for the merge train Head: 7962d5a |
…2f4285372d7403d: merge PR #5833
The normal testing restore stayed pending as
testing_in_useon authenticated session files with no recent sign-in. The guard counted any matchinguidorpre_uidfile after the generation cutoff, with no check of whether Odoo still treats that session as live. The decided rule is that such files are stale state, not a person, while real staff work stays protected. Disposition.Refs #5831
Change
The fixed read-only probe now applies Odoo's own session rules:
sessions.max_inactivity_secondswhen set, otherwiseSESSION_LIFETIMEread from the running image's own source. Odoo's session cleanup and cookie lifetime use the same value.deletion_timehas passed no longer counts. Odoo refuses those sessions.A session inside the limit still counts with no recent sign-in, and any recent sign-in still counts on its own. An active browser keeps rewriting its file: Odoo rotates the session after three hours and saves it when it changes. Generation boundaries, drift, holds, needed copies, production separation and originals are unchanged. No session file, hold or record is changed.
The limit is read from
odoo/http/session.pyon Odoo 20 andodoo/http.pyon earlier versions. Odoo 20 moved that module. The parser was checked against the real Odoo 18, 19 and 20 sources.A saved positive needs no change. It stays protective until its five-minute deadline, and a fresh complete negative then replaces it while needed-copy and production-resource protection stay.
Verification
in_useon the unchanged probe, through the emitted program and the normal usage reader.tests.test_odoo_testing_usage,tests.test_disposable_lane_collection,tests.test_testing_rebuild_http,tests.test_testing_rebuild_worker,tests.test_testing_initial_generationandtests.test_odoo_preview_qualification: 317 tests passed. After the final wording and test-name commit,tests.test_odoo_testing_usagepassed again.native_python_support_plugin_unavailable(Headless inspection workers: confirm project interpreter and Pydantic plugin so type findings stop being noise codex-skills#3363), with no findings reported, on1a9a92122. Not repeated on the head, whose only change moves comments into a named predicate, because the same missing prerequisite would return the same UNKNOWN.Not proved here: whether the live 8/9 files are past Odoo's limit. No lane was read for this change. Root's next normal request will show that.
Removed: the file-only positive for sessions Odoo has expired or retired, and the regression that protected an arbitrarily old session when the generation boundary was unavailable.
Net lines: +271 (+288/-17). Regression tests are +228 of that. Product code is +39, to read Odoo's limit instead of copying a number that could drift. Docs are +4.