aglinxinyuan opened a new issue, #5662:
URL: https://github.com/apache/texera/issues/5662

   ## Background
   
   `HeaderField` in `common/auth` (`auth/util/HeaderField.scala`) currently 
lacks a dedicated unit-spec. It is a small `object` that holds the canonical 
HTTP header names the auth layer reads from every request — drift in any 
constant silently breaks header-based authentication.
   
   ```scala
   object HeaderField {
     val UserComputingUnitAccess = "x-user-computing-unit-access"
     val UserId = "x-user-id"
     val UserName = "x-user-name"
     val UserEmail = "x-user-email"
   }
   ```
   
   ## Behavior to pin
   
   | Surface | Contract |
   | --- | --- |
   | `UserComputingUnitAccess` | equals `"x-user-computing-unit-access"` |
   | `UserId` | equals `"x-user-id"` |
   | `UserName` | equals `"x-user-name"` |
   | `UserEmail` | equals `"x-user-email"` |
   | Header-name format | every constant matches the `x-user-*` namespace and 
uses lowercase + hyphen-separated (RFC-7230 compatible) |
   | Distinctness | every constant has a distinct value (no accidental aliasing 
under refactor) |
   
   ## Scope
   
   - New spec file: `HeaderFieldSpec.scala` (matches the 
`<srcClassName>Spec.scala` convention).
   - No production-code changes.
   - This is a very small spec (~50 lines) — the value is regression coverage 
against accidental renames, not coverage of complex logic.
   
   ## Notes
   
   `common/auth` already has ScalaTest as a `% Test` dependency, so no build 
changes are needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to