Back to home page

EIC code displayed by LXR

 
 

    


Warning, /swf-monitor/docs/COMMISSIONING_RELAXATIONS.md is written in an unsupported language. File is not indexed.

0001 # PCS Commissioning Relaxations
0002 
0003 During alpha commissioning, PCS deliberately relaxes its tag-locking and
0004 submission guards so operators can shape the campaign-to-tag mapping freely —
0005 create, edit, re-associate, and submit without a one-way freeze blocking the
0006 corrections still being made. These relaxations are temporary. This note records
0007 each one and exactly how to restore it, so tightening as the system is
0008 commissioned does not require code archaeology.
0009 
0010 The lock *mechanism* is preserved, only its *requirement* is lifted: the
0011 deliberate tag-lock action (`POST /pcs/api/<type>-tags/<n>/lock/`) and the
0012 immutability guard on a locked tag (`_TagViewSetMixin.partial_update`,
0013 `pcs/api_views.py`) are unchanged. An operator can still lock any tag, and a
0014 locked tag still cannot be edited. Tightening means re-enabling the requirements
0015 below; the enforcement machinery already exists.
0016 
0017 Submission never had an explicit "tags must be locked" check. The guarantee was
0018 implicit: composition (relaxation 2) required locked tags, so every task's
0019 dataset carried locked tags by the time it could be submitted. Relaxing
0020 composition therefore already removed that implicit submission-provenance;
0021 relaxation 4 additionally lifts the task-level `ready` freeze.
0022 
0023 ## Relaxations and how to restore them
0024 
0025 | # | Relaxed | Where (symbol) | Restore by | Status |
0026 |---|---------|----------------|-----------|--------|
0027 | 1 | Auto-derived tags are created `draft`, not `locked`; a matched draft is reused as-is rather than locked in place. | `find_or_create_physics_tag`, `find_or_create_background_tag`, `find_or_create_evgen_tag` — `pcs/services.py` | Create with `status='locked'`; restore the "lock a matched draft in place" branch (the former `reuse-locked` / `lock-in-place` actions). | Active |
0028 | 2 | Datasets accept `draft` tags — the "tag must be locked before use" requirement is dropped from composition. | `Dataset.clean` (`pcs/models.py`); `DatasetViewSet.create` (`pcs/api_views.py`); `dataset_intake` (`pcs/services.py`); `DatasetForm` tag fields (`pcs/forms.py`); `_ensure_csvimport_anchors` (`pcs/services.py`) | Re-add the `status != 'locked'` → reject check in `Dataset.clean`, `DatasetViewSet.create`, and `dataset_intake`; filter the `DatasetForm` tag querysets to `status='locked'`; have `_ensure_csvimport_anchors` require a locked anchor again. | Active |
0029 | 3 | All existing PCS tags were set to `draft` (one-time data change). | migration `0012_unlock_all_tags_draft` (`pcs/migrations/`) | Not a global revert — lock each tag deliberately, via the lock action, as it is finalised. | Active |
0030 | 4 | A `draft` task can be submitted directly; the `status='ready'` freeze is dropped, and `prodtask_readiness_problems` is surfaced as a non-blocking `warnings` field on the submit response rather than gating. | `prodtask_submit_request` and `prodtask_record_submission` ready-gates (`pcs/services.py`); the `submit` action warning surface (`pcs/api_views.py`) | Restore the `status != 'ready'` raise in both `prodtask_submit_request` and `prodtask_record_submission`; drop the warnings surface. The `draft→ready` readiness gate (`prodtask_set_status`) is unchanged and still blocks the deliberate lock-to-ready path. | Active |
0031 
0032 ## What is not relaxed
0033 
0034 - The tag lock action and the locked-tag edit guard (above) — the means of tightening.
0035 - The readiness *checks* themselves still run (`prodtask_readiness_problems`: output configured, physics tag beam matches the sample). They describe submission correctness, not provenance, so under relaxation 4 they are surfaced as a warning rather than blocking; the checks are not removed.
0036 
0037 ## Related
0038 
0039 - [PCS.md](PCS.md) — tag lifecycle (draft → locked).
0040 - [PCS_BACKGROUND_TAG.md](PCS_BACKGROUND_TAG.md), [EPICPROD_QUESTIONNAIRE.md](EPICPROD_QUESTIONNAIRE.md) — the entities these guards apply to.