You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hrw4u/header_rewrite: Add session-scope state variables (#12989)
* hrw4u/header_rewrite: Add session-scope state variables
Add SESSION-FLAG, SESSION-INT8, and SESSION-INT16 conditions and
their corresponding set-session-flag, set-session-int8, and
set-session-int16 operators to the header_rewrite plugin. These
mirror the existing transaction-scoped state variables but persist
across keep-alive requests on the same connection, using a
TS_USER_ARGS_SSN slot. The condition and operator classes are
parameterized with a TSUserArgType scope argument to avoid code
duplication. The hrw4u transpiler adds a SESSION_VARS section for
declaring session-scoped variables, and the reverse transpiler
handles both scopes. Documentation and tests are included.
Co-Authored-By: Craig Taylor
* Address Copilot review comments
Use SESSION_VARS instead of VARS for session sandbox check.
Reserve user-arg slots lazily per scope in acquire_state_slot().
Fix _state_vars type annotation to include VarScope in key tuple.
* Address bneradt's review: wire SESSION_VARS into kg and LSP
kg_visitor.py was missing sessionVarSection dispatch in visitSection,
causing hrw4u-kg to silently drop SESSION_VARS blocks. lsp/strings.py
only detected VARS { ... } for declaration mode, leaving session-scoped
variables without hover/type metadata in hrw4u-lsp.
0 commit comments