short-session-affinity-keys: Short Session Affinity Keys #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/short-session-affinity-keys"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assigned idea
Benchmark authoring specification.
Summary: Maintain the patched @flue/runtime behavior so session affinity keys remain deterministic but never exceed 64 characters.
Task intent: Update the repo’s @flue/runtime patch so createSessionAffinityKey keeps the original instance::harness::sessionName format for short inputs, but shortens long keys with a deterministic 64-bit hash and a hard 64-character limit.
Benchmark plan: Construct the task package from sidpalas/deputies at 7e31b5d422df20db56ac28d15bfd9e65972eb943, then create the starting state by reverting only the createSessionAffinityKey hunk in patches/@flue__runtime@0.8.0.patch back to the single template-string return. The solver-facing work request should ask for the upstream-facing patch maintenance change: bound session affinity keys to 64 characters without changing short-key behavior. Keep all verifier files outside the repo tree used by the solver.
Environment plan: environment/repo: materialize sidpalas/deputies at the fixed commit and expose the normal repository files. environment/task: provide a Python pytest-based verifier that reads patches/@flue__runtime@0.8.0.patch and evaluates the patched JavaScript logic in an isolated temporary file; do not require network access or package installation.
Verifier plan: test_outputs.py should run from the repository root. It should assert patches/@flue__runtime@0.8.0.patch exists, extract the patched createSessionAffinityKey implementation, and run behavioral checks with node or a temporary JS module: short inputs return the exact unmodified key; long session names produce keys of length <=64; very long instance and harness names fall back to h:<16 lowercase hex>; repeated inputs are deterministic; and selected long inputs match a Python implementation of the same FNV-1a 64-bit hash.
Oracle plan: The oracle solution is the existing patch hunk shown in patches/@flue__runtime@0.8.0.patch: introduce MAX_SESSION_AFFINITY_KEY_LENGTH = 64, compute the raw key first, return it if short enough, otherwise return instance::harness::h: when that fits, and finally h:. The hash oracle is unsigned 64-bit FNV-1a using BigInt and hex padded to 16 characters.
Difficulty plan: Current coding agents may miss that the work lives in a patch file rather than application source, may implement a non-matching hash such as SHA or MD5, may truncate strings instead of preserving deterministic affinity, or may forget the second fallback when the prefixed shortened form still exceeds 64 characters.
Repo patch scope: Expected upstream edit scope is only patches/@flue__runtime@0.8.0.patch. Do not require changes to package manifests, lockfiles, generated verifier files, or unrelated source directories.
Anti-leakage notes: Solver-facing text must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present it only as ordinary maintenance of the @flue/runtime patch.
Approach: Use the provided patch evidence as both the behavioral target and the oracle. Build the initial challenge by removing that exact fix, then verify the restored behavior through functional tests rather than simple string matching.
Verification: Run python -m pytest test_outputs.py from the task verifier directory against the completed repo. The verifier must inspect patches/@flue__runtime@0.8.0.patch and execute concrete createSessionAffinityKey cases with Node.js or an equivalent extracted JS module.
Risk: The main risk is overfitting to textual patch contents. Mitigate by making the verifier behavior-focused with multiple key lengths and exact FNV-1a expected values, while still checking the edit remains confined to the patch file.
Path rules: task package is tasks/; mutable upstream checkout is tasks//environment/repo; benchmark package files are under tasks//task; verifier/container environment belongs under tasks//task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest.
Agent context
Task slug: short-session-affinity-keys
Branch: task/short-session-affinity-keys
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.