{"action":"opened","issue":{"url":"https://api.github.com/repos/kadena-io/pact/issues/222","repository_url":"https://api.github.com/repos/kadena-io/pact","labels_url":"https://api.github.com/repos/kadena-io/pact/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/kadena-io/pact/issues/222/comments","events_url":"https://api.github.com/repos/kadena-io/pact/issues/222/events","html_url":"https://github.com/kadena-io/pact/issues/222","id":361041297,"node_id":"MDU6SXNzdWUzNjEwNDEyOTc=","number":222,"title":"Pact allows introspection of opaque values from environment","user":{"login":"bts","id":5743,"node_id":"MDQ6VXNlcjU3NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/5743?v=4","gravatar_id":"","url":"https://api.github.com/users/bts","html_url":"https://github.com/bts","followers_url":"https://api.github.com/users/bts/followers","following_url":"https://api.github.com/users/bts/following{/other_user}","gists_url":"https://api.github.com/users/bts/gists{/gist_id}","starred_url":"https://api.github.com/users/bts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bts/subscriptions","organizations_url":"https://api.github.com/users/bts/orgs","repos_url":"https://api.github.com/users/bts/repos","events_url":"https://api.github.com/users/bts/events{/privacy}","received_events_url":"https://api.github.com/users/bts/received_events","type":"User","site_admin":false},"labels":[{"id":480507152,"node_id":"MDU6TGFiZWw0ODA1MDcxNTI=","url":"https://api.github.com/repos/kadena-io/pact/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-17T20:57:24Z","updated_at":"2018-09-17T20:57:24Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"According to the docs for [`read-msg`](https://pact-language.readthedocs.io/en/latest/pact-functions.html?highlight=sig-keyset#read-msg), the function should return opaque values if the requested key corresponds to a list or object.\r\n\r\nBut in the REPL I am able to introspect the values:\r\n\r\n```lisp\r\n(env-data { \"admin-keyset\": [\"mockAdminKey\"], \"a-list\": [1 2 3], \"an-obj\": {\"k\": \"v\"} })\r\n(env-keys [\"mockAdminKey\"])\r\n(define-keyset 'admins (read-keyset \"admin-keyset\"))\r\n\r\n(module test 'admins\r\n  (defun inspect-list ()\r\n    (length (read-msg \"a-list\")))\r\n  (defun inspect-obj ()\r\n    (at 'k (read-msg \"an-obj\")))\r\n)\r\n\r\n(inspect-list)\r\n(inspect-obj)\r\n```\r\n\r\nWhen this loads, it displays the following. Note the final two lines:\r\n\r\n```\r\n\"Setting transaction data\"\r\n\"Setting transaction keys\"\r\n\"Keyset defined\"\r\n\"Loaded module \\\"test\\\", hash \\\"a9e35e1b6f758da9547a8dc800f3116982688d5c6c7bce6c2996c69129cfe26e27fcd8eabf854532bd3ea85a2e67c6e3c42190a0753a4dff30b2717aa551c720\\\"\"\r\n3\r\n\"v\"\r\n```\r\n\r\n/cc @emilypi @joelburget @slpopejoy "}}
{"actor":{"display_login":"bts"}}