Commit Graph

  • 24a9b7ba28 first pass at integrating execpolicy2 into codex kevin zhao 2025-11-13 21:04:27 -05:00
  • bdb5210721 cleanup kevin zhao 2025-11-13 17:17:42 -05:00
  • cd4df53316 parser state kevin zhao 2025-11-13 17:12:21 -05:00
  • 43db77a97b feat: implementing parse_many kevin zhao 2025-11-13 16:58:32 -05:00
  • 8cbb5378f3 check_multiple kevin zhao 2025-11-13 16:37:11 -05:00
  • ce220f0be2 Use camelCase for policy responses zhao-oai 2025-11-13 16:07:07 -05:00
  • 7697a2bb81 update readme kevin zhao 2025-11-13 15:05:02 -05:00
  • 762881b60c remove use of parking lot kevin zhao 2025-11-13 14:41:41 -05:00
  • 2e14f258c3 now keeping PolicyBuilder in a RefCell, allowing add_rule to take &mut self w/o Mutex kevin zhao 2025-11-13 14:38:47 -05:00
  • c4fea9d99f moving default codexpolicy to example kevin zhao 2025-11-13 14:20:32 -05:00
  • ae17058704 directly passing starlark error kevin zhao 2025-11-13 14:14:58 -05:00
  • 820e26f9d2 better naming in Policy.parse() kevin zhao 2025-11-13 13:47:26 -05:00
  • 175e3530bc move validation logic to rule.rs kevin zhao 2025-11-13 13:42:30 -05:00
  • c7993e0471 conslidate validate_match_examples and validate_not_match_examples kevin zhao 2025-11-13 13:39:10 -05:00
  • dc76907771 refactor: rule traits kevin zhao 2025-11-13 13:00:11 -05:00
  • f7fa9c5c0f using expect to provide more context if unwraps fail kevin zhao 2025-11-12 20:02:33 -05:00
  • 556510f378 avoid matching on as_slice() when you can use is_empty() kevin zhao 2025-11-12 20:00:12 -05:00
  • b038bd71f9 sort deps kevin zhao 2025-11-12 19:54:08 -05:00
  • ffdebc2937 again, more descriptive error messages kevin zhao 2025-11-12 19:03:15 -05:00
  • 9b3041ffe5 print out actual type in error message kevin zhao 2025-11-12 19:02:19 -05:00
  • 80c67243df cleanup kevin zhao 2025-11-12 19:00:09 -05:00
  • 83cfac9442 delete more display() kevin zhao 2025-11-12 18:58:32 -05:00
  • 9bf0c066d9 more cleanup kevin zhao 2025-11-12 18:57:34 -05:00
  • 615a027a18 further cleanup kevin zhao 2025-11-12 18:53:29 -05:00
  • ceea9075ea docstrings and other cleanup kevin zhao 2025-11-12 18:51:32 -05:00
  • 3162a77e2a remove fragile test kevin zhao 2025-11-12 18:42:22 -05:00
  • 842d6adb59 refactor to test positive matches kevin zhao 2025-11-12 18:34:00 -05:00
  • e51178cb27 consolidate new() and parse() in PolicyParser kevin zhao 2025-11-12 17:53:15 -05:00
  • ff970d57fb using PathBufs in main.rs kevin zhao 2025-11-12 17:40:27 -05:00
  • a4cd582b49 removing decription() kevin zhao 2025-11-12 17:36:14 -05:00
  • ab546c69ed removing expect-test as dependency kevin zhao 2025-11-12 17:25:48 -05:00
  • ad55ca629c refactor: using deep assertions instead of expect tests; removed Display impls kevin zhao 2025-11-12 17:20:59 -05:00
  • 8a98b7afd3 reordering so that impl comes before def kevin zhao 2025-11-12 17:04:35 -05:00
  • 7b5916cb4b Share prefix pattern data in execpolicy2 instead of cloning kevin zhao 2025-11-12 16:51:18 -05:00
  • 0f51ed0baa removing len() and is_empty() kevin zhao 2025-11-12 16:08:51 -05:00
  • 00757b43aa remove default policy kevin zhao 2025-11-12 14:47:28 -05:00
  • b751be9156 cleanup and prettify kevin zhao 2025-11-12 14:36:48 -05:00
  • 4d0fffd387 moving up expect test dependency kevin zhao 2025-11-12 14:25:03 -05:00
  • fd29c3f0a1 removing rg and sed from default codexpolicy kevin zhao 2025-11-12 14:18:55 -05:00
  • 8c909a0084 making things more functional kevin zhao 2025-11-12 14:11:48 -05:00
  • 2f8d3f6b42 code cleanup kevin zhao 2025-11-12 14:04:16 -05:00
  • 17f86a6c86 clippy kevin zhao 2025-11-12 13:04:55 -05:00
  • d3aafb93f3 feat: tokenizing whole strings in match and not_match kevin zhao 2025-11-12 12:49:47 -05:00
  • 814c6506d2 execpolicy2 now inherits workspace crate version zhao-oai 2025-11-11 21:04:58 -05:00
  • 94e8d4e0ae .policy -> .codexpolicy kevin zhao 2025-11-11 21:01:31 -05:00
  • 66dca34c1c using camelCase kevin zhao 2025-11-11 20:53:53 -05:00
  • 1743981ee5 evaluation -> check kevin zhao 2025-11-11 20:43:48 -05:00
  • 0e6d965f65 updating default.policy with better not_match (or, if it is too evident, removing not_match entirely) kevin zhao 2025-11-11 20:34:39 -05:00
  • b323a9248d updating basic.rs to have a less obvious not match kevin zhao 2025-11-11 20:33:52 -05:00
  • 7681b325fe basic.rs: using expect tests kevin zhao 2025-11-11 20:17:52 -05:00
  • 2217cb05ee fix lint kevin zhao 2025-11-11 19:38:02 -05:00
  • c086fe35a5 adding is_match to Evaluation kevin zhao 2025-11-11 19:25:53 -05:00
  • 755331425e refactor: implementing rule traits, rulematch enum kevin zhao 2025-11-11 19:22:31 -05:00
  • 4ca1834eac update docstring kevin zhao 2025-11-11 17:30:18 -05:00
  • 8b4283e4ad improve phrasing kevin zhao 2025-11-11 07:35:50 -08:00
  • 58acf0b833 adding docstrings for PrefixPattern and PatternToken kevin zhao 2025-11-11 07:32:11 -08:00
  • 8834e4bbdc helper function to get PolicyBuilder + only getting one builder in prefix_rule kevin zhao 2025-11-10 23:37:33 -08:00
  • 8775a99e3d fallback instead of panicking kevin zhao 2025-11-10 23:06:27 -08:00
  • 00ff42d594 using shlex::try_join instead of " ".join() kevin zhao 2025-11-10 22:58:34 -08:00
  • ff09321eb1 updated error messaging to indicate type kevin zhao 2025-11-10 22:49:42 -08:00
  • a67521926a fmt kevin zhao 2025-11-10 22:26:30 -08:00
  • 17bb82de77 using .iter() instead of mut kevin zhao 2025-11-10 19:26:58 -08:00
  • ecbcc37bfb alphasort members kevin zhao 2025-11-10 19:15:14 -08:00
  • b03c3c3d1f more early return lines kevin zhao 2025-11-10 19:01:32 -08:00
  • a2890e2ca7 adding a line after early return block kevin zhao 2025-11-10 18:59:24 -08:00
  • 230cb2e3e2 best -> strictest kevin zhao 2025-11-10 18:56:27 -08:00
  • 7737444356 clippy kevin zhao 2025-11-10 18:53:54 -08:00
  • 90411d6e90 [parser.rs] match token vector on length kevin zhao 2025-11-10 18:50:31 -08:00
  • 5fd2172f9f update lints kevin zhao 2025-11-10 18:49:56 -08:00
  • 1b09f32cd5 Update codex-rs/execpolicy2/src/parser.rs zhao-oai 2025-11-10 18:13:59 -08:00
  • 31736f2c20 remove license kevin zhao 2025-11-10 18:16:19 -08:00
  • b405a8c812 refactor parse_pattern to use iterator chain kevin zhao 2025-11-10 17:55:17 -08:00
  • bc375db0ab using parking_lot mutex + AtomicU64 for auto id kevin zhao 2025-11-10 17:45:50 -08:00
  • 73cbf5a83e add docstrings to decision struct kevin zhao 2025-11-10 17:28:04 -08:00
  • 072f5c28fc using clap for execpolicy v2 cli kevin zhao 2025-11-10 17:24:47 -08:00
  • 2952c14719 implementing PartialOrd for Decision instead of defining custom is_stricter_than func kevin zhao 2025-11-10 17:20:51 -08:00
  • 270abdc0c4 use camelCase in Decision' kevin zhao 2025-11-10 17:16:57 -08:00
  • aa15efd7a3 update readme kevin zhao 2025-11-10 16:36:33 -08:00
  • ca9e61497d README kevin zhao 2025-11-10 16:14:38 -08:00
  • 687a8c38ff introduce variant typing to policy result kevin zhao 2025-11-10 16:02:36 -08:00
  • 0bac9939af better default policy + lint kevin zhao 2025-11-10 15:54:01 -08:00
  • bf716081fc clean up test kevin zhao 2025-11-10 15:49:15 -08:00
  • 55e49a8016 remove extraneous test kevin zhao 2025-11-10 15:44:26 -08:00
  • 64e786caad simplify kevin zhao 2025-11-10 15:37:09 -08:00
  • 9aea52efb1 simplify logic kevin zhao 2025-11-10 15:26:25 -08:00
  • 7e79c4dc5b refactor rules so no more cartesian product kevin zhao 2025-11-10 15:20:50 -08:00
  • eea9bff1fb remove tokenize_command use cases kevin zhao 2025-11-10 14:14:28 -08:00
  • 71ea7edca4 update shape of RuleMatch and Evaluation kevin zhao 2025-11-10 13:10:50 -08:00
  • 85edde08c1 fix cargo shear kevin zhao 2025-11-10 11:43:36 -08:00
  • 773177ec8b first pass at prefix rules kevin zhao 2025-11-10 10:38:08 -08:00
  • 6c384eb9c6 tests: replace mount_sse_once_match with mount_sse_once for SSE mocking (#6640) pakrym-oai 2025-11-13 18:04:05 -08:00
  • 285c825c93 Merge branch 'main' into start-tokenizer-on-start Ahmed Ibrahim 2025-11-13 17:43:13 -08:00
  • df640801f2 move Ahmed Ibrahim 2025-11-13 17:39:07 -08:00
  • ab1287cdb0 move Ahmed Ibrahim 2025-11-13 17:31:18 -08:00
  • 3b98b6e98b move Ahmed Ibrahim 2025-11-13 17:31:02 -08:00
  • 01ba9446ac move Ahmed Ibrahim 2025-11-13 17:30:51 -08:00
  • 090ffa4b0f move Ahmed Ibrahim 2025-11-13 17:30:20 -08:00
  • 2a6e9b20df Promote shared helpers for suite tests (#6460) Ahmed Ibrahim 2025-11-13 17:12:10 -08:00
  • f3c6b1334b Use shared network gating helper in chat completion tests (#6461) Ahmed Ibrahim 2025-11-13 17:11:43 -08:00
  • 9890ceb939 Avoid double truncation (#6631) Ahmed Ibrahim 2025-11-13 16:59:31 -08:00