Skip to content

feat(awk): implement phase 3 practical features#241

Open
matt-dz wants to merge 22 commits into
codex/awk-phase-2from
codex/awk-phase-3
Open

feat(awk): implement phase 3 practical features#241
matt-dz wants to merge 22 commits into
codex/awk-phase-2from
codex/awk-phase-3

Conversation

@matt-dz
Copy link
Copy Markdown
Collaborator

@matt-dz matt-dz commented May 7, 2026

Summary

Builds on the earlier awk phases to make the builtin useful for real record-processing scripts. This phase adds associative arrays, loops, range patterns, regex field splitting, mutable record/field semantics, and ENVIRON while broadening both scenario and rewritten harness coverage.

  • Adds arrays with in, delete, for (k in array), and split.
  • Adds C-style for, while, break, and continue.
  • Adds range patterns, regex FS, $0 rebuilding, $0 = value resplitting, and NF = value.
  • Populates ENVIRON from rshell's shell-visible environment snapshot.

Validation

  • make fmt
  • go test ./builtins/awk ./builtins/tests/awk ./analysis
  • go test ./tests -run 'TestShellScenarios/.*/cmd/awk/'
  • make test_awk_rewritten

@matt-dz matt-dz changed the title [codex] Add awk associative array elements [codex] Implement awk Phase 3 May 7, 2026
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 7, 2026

@codex please review this PR.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95e160ef48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/runtime.go
Comment thread builtins/awk/runtime.go Outdated
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 7, 2026

@codex please review this PR again after 4d85c8b8.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d85c8b83e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/eval.go
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 7, 2026

@codex please review this PR again after 8ac0c5a9.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8ac0c5a909

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/runtime.go
Comment thread builtins/awk/runtime.go Outdated
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 7, 2026

@codex please review this PR again after 09a78ff1.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09a78ff1bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/parser.go Outdated
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex please review this PR again after 98b6d5b8.

Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex review this PR again. Latest pushed commit is 98b6d5b8; please run another review pass.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98b6d5b817

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/runtime.go Outdated
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex review this PR again. Latest pushed commit is 7ebb7ae9; please run another review pass.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ebb7ae9b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/runtime.go
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex review this PR again. Latest pushed commit is 7debfe6c; please run another review pass.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7debfe6c8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/runtime.go
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex review this PR again. Latest pushed commit is 7debfe6c; please run another review pass. The previous split("abc", a, /^/) finding was resolved as invalid after checking against GNU awk.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7debfe6c8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/runtime.go Outdated
Comment thread builtins/awk/runtime.go Outdated
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex review this PR again. Latest pushed commit is 2e6c2473; please run another review pass.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e6c247365

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/runtime.go
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex review this PR again. Latest pushed commit is b9f8ff0d; please run another review pass.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9f8ff0dd7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread builtins/awk/parser.go
Copy link
Copy Markdown
Collaborator Author

matt-dz commented May 8, 2026

@codex review this PR again. Latest pushed commit is 7c8a54ab; please run another review pass.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@matt-dz matt-dz force-pushed the codex/awk-phase-2 branch from 24f0fce to e90c4d1 Compare May 8, 2026 14:54
@matt-dz matt-dz force-pushed the codex/awk-phase-3 branch from 7c8a54a to 299327e Compare May 8, 2026 15:16
@matt-dz matt-dz changed the base branch from codex/awk-phase-2 to main May 8, 2026 15:27
@matt-dz matt-dz changed the base branch from main to codex/awk-phase-2 May 8, 2026 15:34
@matt-dz matt-dz changed the base branch from codex/awk-phase-2 to main May 8, 2026 17:33
@matt-dz matt-dz changed the title [codex] Implement awk Phase 3 awk: implement phase 3 practical features May 11, 2026
@matt-dz matt-dz force-pushed the codex/awk-phase-3 branch from b6a1cbe to 926c994 Compare May 11, 2026 15:46
@matt-dz matt-dz marked this pull request as ready for review May 11, 2026 17:55
@matt-dz matt-dz changed the base branch from main to codex/awk-phase-2 May 11, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant