---
feature_story: FS_62_25_92_06
feature_title: manipulating `assigned_context`
feature_status: TODO
---

TODO: Merge `assigned_context` and `args_context`? Because plural `args_` is easily singular `arg_`.
TODO: Figure out how to deal with over-specified context.
      How to solve problem when context extra arg type = arg value entry hides `data_envelope`-s
      (which do not contain such entry) from search results?
      Approach - see FS_31_70_49_15:
      The query specifies (arg type, arg value) pairs from `assigned_types_to_values`
      but only those listed in `keys_to_types_list`.

The context represents "assigned" (arg type, arg value) pairs list (in fact, {arg type: arg value} dict).

For example, a pre-set (arg type, arg value) pairs could be specifying some dev environment:
*   `CodeMaturity` = dev
*   `FlowStage` = upstream
*   `GeoRegion` = apac

Each arg type = arg value entry in the context has associated metadata:

*   `ArgSource`: where the value comes from.

     Effectively, it specifies priority (whether another source can override) it.

     For example, `ExplicitArg` overrides any other `ArgSource.*`.

*   Last modification actor: who changed this arg type = arg value entry.

Each arg type = arg value entry in the context can be manipulated:
*   Added if it did not exist yet.
*   Overridden if it already existed (if prev `ArgSource` had higher priority of the next one)
*   Removed if it already existed.
