feat(env): apply carries env prompts/metrics forward #264
Merged
Conversation
Fix env apply dropping prompt provenance: - stamp_apply_provenance is now read-modify-write, preserving an env-tip commit's own ai_metadata/test_metrics on fast-forward apply (previously force-clobbered with a fresh ai_metadata=None record). - --patch (squash) apply folds the squashed env commits' prompts (as a list, never concatenated), summed test metrics, subjects, and the context-branch tip onto the applied commit's env_provenance, so the driving prompt stays tracked on the parent branch and survives gc. - pr.rs compute_aggregates scores folded prompts individually; merge/FF leave the fold empty so there is no double count. Tests: fold collection, stamp RMW preservation, folded-prompt scoring (+ no-double-count), and an end-to-end --patch fold integration test.
…aged mount Memo the env model-pin feature and its enforcement analysis: - Claude managed-settings availableModels/enforceAvailableModels is the hard lever; ANTHROPIC_MODEL alone is weak. - container tier airtight (private overlay rootfs); kernel tiers share the host /etc so a rootless h5i cannot create the managed mountpoint. - Option 1 (actionable): one-time root-provisioned /etc/claude-code/managed-settings.json, then per-env MS_BIND over it in pre_exec (like the existing /etc/hosts bind), with graceful fallback to today's soft pin. Option 2 (overlay /etc) rejected as fragile. - Shared policy surface: [profile.X] model field, extend managed_settings_wrap_bash_json(), fold into policy_digest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.