Part of the service-identity work, QRun-IO/qqq#1248. Draft: it needs the QQQ RC that contains qqq#1255 and #1256. Bump qqq.snapshot.version once the release captain cuts it.
Problem: on kof22 every data_analysis_run_schedules run fails with Invalid session in request. The self-made data-analysis-scheduler QSession is rejected by OAuth2.
Fix:AnalysisSessions picks the session for scheduled work.
When the host declares the principal (DataAnalysisQBitConfig.servicePrincipal, default data-analysis), schedule and watch inventory runs as it. Owner and recipient runs go through ServiceIdentities.sessionOnBehalfOf, which gives the user's current access intersected with the principal's. Record locks still apply per recipient.
A host ownerSessionSupplier still wins.
With no principal declared, the previous sessions are kept.
EffectiveConfigResolver's settings read stays on the system session. It is a per-request config read (plumbing, design section 6.3), not scheduled work.
Tests:
SchedulesTest.inventoryRunsAsTheDeclaredPrincipal: a principal without grants finds and sends nothing; with grants, the schedule runs and delivers.
Full suite: 311, 0 failures, against a local install of qqq#1256.
Part of the service-identity work, QRun-IO/qqq#1248. **Draft:** it needs the QQQ RC that contains qqq#1255 and #1256. Bump `qqq.snapshot.version` once the release captain cuts it.
**Problem:** on kof22 every `data_analysis_run_schedules` run fails with `Invalid session in request`. The self-made `data-analysis-scheduler` QSession is rejected by OAuth2.
**Fix:** `AnalysisSessions` picks the session for scheduled work.
- When the host declares the principal (`DataAnalysisQBitConfig.servicePrincipal`, default `data-analysis`), schedule and watch inventory runs as it. Owner and recipient runs go through `ServiceIdentities.sessionOnBehalfOf`, which gives the user's current access intersected with the principal's. Record locks still apply per recipient.
- A host `ownerSessionSupplier` still wins.
- With no principal declared, the previous sessions are kept.
- `EffectiveConfigResolver`'s settings read stays on the system session. It is a per-request config read (plumbing, design section 6.3), not scheduled work.
**Tests:**
- `SchedulesTest.inventoryRunsAsTheDeclaredPrincipal`: a principal without grants finds and sends nothing; with grants, the schedule runs and delivers.
- Full suite: 311, 0 failures, against a local install of qqq#1256.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of the service-identity work, QRun-IO/qqq#1248. Draft: it needs the QQQ RC that contains qqq#1255 and #1256. Bump
qqq.snapshot.versiononce the release captain cuts it.Problem: on kof22 every
data_analysis_run_schedulesrun fails withInvalid session in request. The self-madedata-analysis-schedulerQSession is rejected by OAuth2.Fix:
AnalysisSessionspicks the session for scheduled work.DataAnalysisQBitConfig.servicePrincipal, defaultdata-analysis), schedule and watch inventory runs as it. Owner and recipient runs go throughServiceIdentities.sessionOnBehalfOf, which gives the user's current access intersected with the principal's. Record locks still apply per recipient.ownerSessionSupplierstill wins.EffectiveConfigResolver's settings read stays on the system session. It is a per-request config read (plumbing, design section 6.3), not scheduled work.Tests:
SchedulesTest.inventoryRunsAsTheDeclaredPrincipal: a principal without grants finds and sends nothing; with grants, the schedule runs and delivers.🤖 Generated with Claude Code